diff --git a/lib/pip.js b/lib/pip.js index ccb809c3..059ccb26 100644 --- a/lib/pip.js +++ b/lib/pip.js @@ -376,10 +376,10 @@ async function installRequirements(targetFolder, pluginInstance) { break; } - let spawnArgs = { shell: true }; - if (process.env.SLS_DEBUG) { - spawnArgs.stdio = 'inherit'; - } + const spawnArgs = { + shell: true, + stdio: 'inherit', + }; let mainCmds = []; if (dockerCmd.length) { dockerCmd.push(...mergeCommands(pipCmds)); @@ -397,7 +397,7 @@ async function installRequirements(targetFolder, pluginInstance) { for (const [cmd, ...args] of mainCmds) { try { - await spawn(cmd, args); + await spawn(cmd, args, spawnArgs); } catch (e) { if ( e.stderrBuffer &&