Skip to content

Commit

Permalink
deps: promise-spawn@8.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Nov 20, 2024
1 parent 977fd57 commit a1f9d48
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
16 changes: 14 additions & 2 deletions node_modules/@npmcli/promise-spawn/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,19 @@ const open = (_args, opts = {}, extra = {}) => {

let platform = process.platform
// process.platform === 'linux' may actually indicate WSL, if that's the case
// we want to treat things as win32 anyway so the host can open the argument
// open the argument with sensible-browser which is pre-installed
// In WSL, set the default browser using, for example,
// export BROWSER="/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"
// or
// export BROWSER="/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
// To permanently set the default browser, add the appropriate entry to your shell's
// RC file, e.g. .bashrc or .zshrc.
if (platform === 'linux' && os.release().toLowerCase().includes('microsoft')) {
platform = 'win32'
platform = 'wsl'
if (!process.env.BROWSER) {
return Promise.reject(
new Error('Set the BROWSER environment variable to your desired browser.'))
}
}

let command = options.command
Expand All @@ -146,6 +156,8 @@ const open = (_args, opts = {}, extra = {}) => {
// accidentally interpret the first arg as the title, we stick an empty
// string immediately after the start command
command = 'start ""'
} else if (platform === 'wsl') {
command = 'sensible-browser'
} else if (platform === 'darwin') {
command = 'open'
} else {
Expand Down
6 changes: 3 additions & 3 deletions node_modules/@npmcli/promise-spawn/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@npmcli/promise-spawn",
"version": "8.0.1",
"version": "8.0.2",
"files": [
"bin/",
"lib/"
Expand Down Expand Up @@ -33,7 +33,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^5.0.0",
"@npmcli/template-oss": "4.23.3",
"@npmcli/template-oss": "4.23.4",
"spawk": "^1.7.1",
"tap": "^16.0.1"
},
Expand All @@ -42,7 +42,7 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.23.3",
"version": "4.23.4",
"publish": true
},
"dependencies": {
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"@npmcli/fs": "^4.0.0",
"@npmcli/map-workspaces": "^4.0.1",
"@npmcli/package-json": "^6.0.1",
"@npmcli/promise-spawn": "^8.0.1",
"@npmcli/promise-spawn": "^8.0.2",
"@npmcli/redact": "^3.0.0",
"@npmcli/run-script": "^9.0.1",
"@sigstore/tuf": "^2.3.4",
Expand Down Expand Up @@ -2470,9 +2470,9 @@
}
},
"node_modules/@npmcli/promise-spawn": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-8.0.1.tgz",
"integrity": "sha512-ZscqKtJqy7oj6MgXEJcHQ1om4utU0Q84QtC28UVuiO6ALSO9sDPanXdu6Wd1oYhItW8fx2u96zRFUE8BuPlAjA==",
"version": "8.0.2",
"resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-8.0.2.tgz",
"integrity": "sha512-/bNJhjc+o6qL+Dwz/bqfTQClkEO5nTQ1ZEcdCkAQjhkZMHIh22LPG7fNh1enJP1NKWDqYiiABnjFCY7E0zHYtQ==",
"inBundle": true,
"license": "ISC",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@npmcli/fs": "^4.0.0",
"@npmcli/map-workspaces": "^4.0.1",
"@npmcli/package-json": "^6.0.1",
"@npmcli/promise-spawn": "^8.0.1",
"@npmcli/promise-spawn": "^8.0.2",
"@npmcli/redact": "^3.0.0",
"@npmcli/run-script": "^9.0.1",
"@sigstore/tuf": "^2.3.4",
Expand Down

0 comments on commit a1f9d48

Please sign in to comment.