Skip to content

Commit 8821bf7

Browse files
committed
Fix WSL access via remote SSH
Fixes #209
1 parent 8ce0f7d commit 8821bf7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {isWsl, powerShellPath, convertWslPathToWindows} from 'wsl-utils';
99
import defineLazyProperty from 'define-lazy-prop';
1010
import defaultBrowser from 'default-browser';
1111
import isInsideContainer from 'is-inside-container';
12+
import isInSsh from 'is-in-ssh';
1213

1314
const execFile = promisify(childProcess.execFile);
1415

@@ -172,7 +173,7 @@ const baseOpen = async options => {
172173
if (app) {
173174
cliArguments.push('-a', app);
174175
}
175-
} else if (platform === 'win32' || (isWsl && !isInsideContainer() && !app)) {
176+
} else if (platform === 'win32' || (isWsl && !isInsideContainer() && !isInSsh && !app)) {
176177
command = await powerShellPath();
177178

178179
cliArguments.push(

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"dependencies": {
5757
"default-browser": "^5.2.1",
5858
"define-lazy-prop": "^3.0.0",
59+
"is-in-ssh": "^1.0.0",
5960
"is-inside-container": "^1.0.0",
6061
"wsl-utils": "^0.2.0"
6162
},

0 commit comments

Comments
 (0)