Skip to content

Commit ff11497

Browse files
authored
refactor: Log child process command output on error (serverless#679)
1 parent 769bc82 commit ff11497

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/pip.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,13 @@ async function installRequirements(targetFolder, pluginInstance) {
415415
'PYTHON_REQUIREMENTS_COMMAND_NOT_FOUND'
416416
);
417417
}
418+
if (log) {
419+
log.info(`Stdout: ${e.stdoutBuffer}`);
420+
log.info(`Stderr: ${e.stderrBuffer}`);
421+
} else {
422+
serverless.cli.log(`Stdout: ${e.stdoutBuffer}`);
423+
serverless.cli.log(`Stderr: ${e.stderrBuffer}`);
424+
}
418425
throw e;
419426
}
420427
}

0 commit comments

Comments
 (0)