diff --git a/vcpkg-artifacts/artifacts/activation.ts b/vcpkg-artifacts/artifacts/activation.ts index 262e57bb4a..693164a2b1 100644 --- a/vcpkg-artifacts/artifacts/activation.ts +++ b/vcpkg-artifacts/artifacts/activation.ts @@ -705,7 +705,7 @@ function generatePowerShellScript(variables: Record, } function generatePosixScript(variables: Record, aliases: Record): string { - return linq.entries(variables).select(([k, v]) => { return v ? `export ${k}="${v}"` : `unset ${k[0]}`; }).join('\n') + + return linq.entries(variables).select(([k, v]) => { return v ? `export ${k}="${v}"` : `unset ${k}`; }).join('\n') + '\n' + linq.entries(aliases).select(([k, v]) => { return v ? `${k}() {\n ${v} $* \n}` : `unset -f ${v} > /dev/null 2>&1`; }).join('\n') + '\n';