Skip to content

Commit 5b91a90

Browse files
committed
Print out child process command output on error #663
A small addition to print out actual error details on child process failure. Refer to #663 for issues details, when build fail for one or another reason, usually connected to configuration error and not library error, but no details are printed out.
1 parent 769bc82 commit 5b91a90

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/pip.js

+7
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)