diff --git a/index.js b/index.js index daa32b7..5d24bc7 100644 --- a/index.js +++ b/index.js @@ -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); @@ -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'); diff --git a/package.json b/package.json index b06908f..3df6ae6 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ "file" ], "dependencies": { + "is-docker": "^2.0.0", "is-wsl": "^2.1.0" }, "devDependencies": {