Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Jan 17, 2024
1 parent d80fe05 commit 73ebbe9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.shellcode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: ci·shellcode
on:
pull_request:
paths:
- src/modes/shellcode.ts
- src/modes/shellcode.*
- src/prefab/construct-env.*
- .github/workflows/ci.shellcode.yml

workflow_call:
Expand Down
3 changes: 2 additions & 1 deletion src/prefab/construct-env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export default async function(pkgenv: { installations: Installation[] }) {
rv[key] = rv[key].replaceAll(new RegExp(`\\$${key}\\b`, 'g'), `\${${key}}`)
// don’t end with a trailing `:` since that is sometimes interpreted as CWD and can break things
// instead of `foo:${PATH}` we end up with `foo${PATH:+:PATH}` which is not POSIX but works
// with all realy shells to avoid the trailing `:`
// with all the shells that we support shellcode for and avoids a trailing `:`
// NOTE this may not work with FISH though.
rv[key] = rv[key].replaceAll(new RegExp(`:+\\$\{${key}}$`, 'g'), `\${${key}:+:$${key}}`)
}

Expand Down

0 comments on commit 73ebbe9

Please sign in to comment.