Skip to content

Commit 8cbf1a7

Browse files
committed
deps: @npmcli/promise-spawn@8.0.2
1 parent 1bd39e7 commit 8cbf1a7

File tree

4 files changed

+22
-10
lines changed

4 files changed

+22
-10
lines changed

node_modules/@npmcli/promise-spawn/lib/index.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,19 @@ const open = (_args, opts = {}, extra = {}) => {
131131

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

139149
let command = options.command
@@ -146,6 +156,8 @@ const open = (_args, opts = {}, extra = {}) => {
146156
// accidentally interpret the first arg as the title, we stick an empty
147157
// string immediately after the start command
148158
command = 'start ""'
159+
} else if (platform === 'wsl') {
160+
command = 'sensible-browser'
149161
} else if (platform === 'darwin') {
150162
command = 'open'
151163
} else {

node_modules/@npmcli/promise-spawn/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@npmcli/promise-spawn",
3-
"version": "8.0.1",
3+
"version": "8.0.2",
44
"files": [
55
"bin/",
66
"lib/"
@@ -33,7 +33,7 @@
3333
},
3434
"devDependencies": {
3535
"@npmcli/eslint-config": "^5.0.0",
36-
"@npmcli/template-oss": "4.23.3",
36+
"@npmcli/template-oss": "4.23.4",
3737
"spawk": "^1.7.1",
3838
"tap": "^16.0.1"
3939
},
@@ -42,7 +42,7 @@
4242
},
4343
"templateOSS": {
4444
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
45-
"version": "4.23.3",
45+
"version": "4.23.4",
4646
"publish": true
4747
},
4848
"dependencies": {

package-lock.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"@npmcli/fs": "^4.0.0",
9191
"@npmcli/map-workspaces": "^4.0.2",
9292
"@npmcli/package-json": "^6.0.1",
93-
"@npmcli/promise-spawn": "^8.0.1",
93+
"@npmcli/promise-spawn": "^8.0.2",
9494
"@npmcli/redact": "^3.0.0",
9595
"@npmcli/run-script": "^9.0.1",
9696
"@sigstore/tuf": "^3.0.0",
@@ -3464,9 +3464,9 @@
34643464
}
34653465
},
34663466
"node_modules/@npmcli/promise-spawn": {
3467-
"version": "8.0.1",
3468-
"resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-8.0.1.tgz",
3469-
"integrity": "sha512-ZscqKtJqy7oj6MgXEJcHQ1om4utU0Q84QtC28UVuiO6ALSO9sDPanXdu6Wd1oYhItW8fx2u96zRFUE8BuPlAjA==",
3467+
"version": "8.0.2",
3468+
"resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-8.0.2.tgz",
3469+
"integrity": "sha512-/bNJhjc+o6qL+Dwz/bqfTQClkEO5nTQ1ZEcdCkAQjhkZMHIh22LPG7fNh1enJP1NKWDqYiiABnjFCY7E0zHYtQ==",
34703470
"inBundle": true,
34713471
"license": "ISC",
34723472
"dependencies": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"@npmcli/fs": "^4.0.0",
5858
"@npmcli/map-workspaces": "^4.0.2",
5959
"@npmcli/package-json": "^6.0.1",
60-
"@npmcli/promise-spawn": "^8.0.1",
60+
"@npmcli/promise-spawn": "^8.0.2",
6161
"@npmcli/redact": "^3.0.0",
6262
"@npmcli/run-script": "^9.0.1",
6363
"@sigstore/tuf": "^3.0.0",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy