Skip to content

Commit a1f9d48

Browse files
committed
deps: promise-spawn@8.0.2
1 parent 977fd57 commit a1f9d48

File tree

4 files changed

+22
-10
lines changed

4 files changed

+22
-10
lines changed

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

+14-2
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

+3-3
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

+4-4
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"@npmcli/fs": "^4.0.0",
9393
"@npmcli/map-workspaces": "^4.0.1",
9494
"@npmcli/package-json": "^6.0.1",
95-
"@npmcli/promise-spawn": "^8.0.1",
95+
"@npmcli/promise-spawn": "^8.0.2",
9696
"@npmcli/redact": "^3.0.0",
9797
"@npmcli/run-script": "^9.0.1",
9898
"@sigstore/tuf": "^2.3.4",
@@ -2470,9 +2470,9 @@
24702470
}
24712471
},
24722472
"node_modules/@npmcli/promise-spawn": {
2473-
"version": "8.0.1",
2474-
"resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-8.0.1.tgz",
2475-
"integrity": "sha512-ZscqKtJqy7oj6MgXEJcHQ1om4utU0Q84QtC28UVuiO6ALSO9sDPanXdu6Wd1oYhItW8fx2u96zRFUE8BuPlAjA==",
2473+
"version": "8.0.2",
2474+
"resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-8.0.2.tgz",
2475+
"integrity": "sha512-/bNJhjc+o6qL+Dwz/bqfTQClkEO5nTQ1ZEcdCkAQjhkZMHIh22LPG7fNh1enJP1NKWDqYiiABnjFCY7E0zHYtQ==",
24762476
"inBundle": true,
24772477
"license": "ISC",
24782478
"dependencies": {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"@npmcli/fs": "^4.0.0",
5858
"@npmcli/map-workspaces": "^4.0.1",
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": "^2.3.4",

0 commit comments

Comments
 (0)