Skip to content

Commit

Permalink
fix: ensure PATH is always set (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
danez authored Aug 10, 2022
1 parent 9ffa88b commit 2f71c57
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 25 deletions.
96 changes: 71 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
"node-fetch": "^3.1.1",
"node-stream-zip": "^1.15.0",
"p-wait-for": "^4.1.0",
"path-key": "^4.0.0",
"semver": "^7.3.5",
"tmp-promise": "^3.0.3",
"uuid": "^8.3.2"
Expand Down
4 changes: 4 additions & 0 deletions src/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import path from 'path'
import process from 'process'

import { execa, ExecaChildProcess, Options } from 'execa'
import pathKey from 'path-key'
import semver from 'semver'

import { download } from './downloader.js'
Expand Down Expand Up @@ -199,6 +200,9 @@ class DenoBridge {
env.DENO_DIR = this.denoDir
}

// Ensure PATH is always set as otherwise we are not able to find the global deno binary
env[pathKey()] = inputEnv[pathKey({ env: inputEnv })] || process.env[pathKey()]

return env
}

Expand Down

0 comments on commit 2f71c57

Please sign in to comment.