Skip to content

Commit 3e09806

Browse files
twondsdschep
authored andcommitted
When using SLS_DEBUG environment variable output pip requirements command (#222)
closes #169
1 parent ce04ef5 commit 3e09806

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/pip.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,11 @@ function installRequirements(
129129
const slimCmd = getSlimPackageCommands(options, preparedPath);
130130
cmdOptions.push(...slimCmd);
131131
}
132-
133-
const res = spawnSync(cmd, cmdOptions, { cwd: servicePath, shell: true });
132+
let spawnArgs = { cwd: servicePath, shell: true };
133+
if (process.env.SLS_DEBUG) {
134+
spawnArgs.stdio = 'inherit';
135+
}
136+
const res = spawnSync(cmd, cmdOptions, spawnArgs);
134137
if (res.error) {
135138
if (res.error.code === 'ENOENT') {
136139
if (options.dockerizePip) {

0 commit comments

Comments
 (0)