Skip to content

Commit

Permalink
Fix Docker in WSL2 (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbrownt committed Jan 29, 2020
1 parent d8a508b commit 417c326
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Expand Up @@ -4,6 +4,7 @@ const path = require('path');
const childProcess = require('child_process');
const fs = require('fs');
const isWsl = require('is-wsl');
const isDocker = require('is-docker');

const pAccess = promisify(fs.access);
const pExecFile = promisify(childProcess.execFile);
Expand Down Expand Up @@ -61,7 +62,7 @@ module.exports = async (target, options) => {
if (options.app) {
cliArguments.push('-a', options.app);
}
} else if (process.platform === 'win32' || isWsl) {
} else if (process.platform === 'win32' || (isWsl && !isDocker)) {
command = 'cmd' + (isWsl ? '.exe' : '');
cliArguments.push('/s', '/c', 'start', '""', '/b');

Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -47,6 +47,7 @@
"file"
],
"dependencies": {
"is-docker": "^2.0.0",
"is-wsl": "^2.1.0"
},
"devDependencies": {
Expand Down

0 comments on commit 417c326

Please sign in to comment.