Skip to content

Commit

Permalink
refactor: Log child process command output on error (#679)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhemaituk committed Feb 28, 2022
1 parent 769bc82 commit ff11497
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/pip.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,13 @@ async function installRequirements(targetFolder, pluginInstance) {
'PYTHON_REQUIREMENTS_COMMAND_NOT_FOUND'
);
}
if (log) {
log.info(`Stdout: ${e.stdoutBuffer}`);
log.info(`Stderr: ${e.stderrBuffer}`);
} else {
serverless.cli.log(`Stdout: ${e.stdoutBuffer}`);
serverless.cli.log(`Stderr: ${e.stderrBuffer}`);
}
throw e;
}
}
Expand Down

0 comments on commit ff11497

Please sign in to comment.