Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion lib/pip.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,15 @@ function installRequirements(targetFolder, serverless, options) {
pipCmd.push('--cache-dir', dockerDownloadCacheDir);
}

if (options.dockerEnv) {
// Add environment variables to docker run cmd
options.dockerEnv.forEach(
function(item) {
cmdOptions.push('-e', item);
}
);
}

if (process.platform === 'linux') {
// Use same user so requirements folder is not root and so --cache-dir works
var commands = [];
Expand Down Expand Up @@ -210,7 +219,7 @@ function installRequirements(targetFolder, serverless, options) {
])
);
}
pipCmd = ['/bin/bash', '-c', '"' + commands.join(' && ') + '"'];
pipCmd = ['/bin/bash', '-c', '"' + commands.join(' ; ') + '"'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the motivation for changing this? Would you really want to keep running commands if one of them fails?

} else {
// Use same user so --cache-dir works
cmdOptions.push('-u', getDockerUid(bindPath));
Expand Down