Skip to content

Commit

Permalink
Fix unset on POSIX.
Browse files Browse the repository at this point in the history
  • Loading branch information
BillyONeal committed Sep 25, 2024
1 parent c16c026 commit 2b3c80d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vcpkg-artifacts/artifacts/activation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ function generatePowerShellScript(variables: Record<string, string | undefined>,
}

function generatePosixScript(variables: Record<string, string | undefined>, aliases: Record<string, string>): 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';
Expand Down

0 comments on commit 2b3c80d

Please sign in to comment.