Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

Commit 64e20db

Browse files
authored
Expand pip commands into separate entries (serverless#431)
Expand pip commands into separate entries
2 parents 3233c60 + 5db477f commit 64e20db

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

lib/pip.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,16 @@ function installRequirements(targetFolder, serverless, options) {
123123
options.pythonBin,
124124
'-m',
125125
'pip',
126-
'install',
127-
...options.pipCmdExtraArgs
126+
'install'
128127
];
128+
129+
if (Array.isArray(options.pipCmdExtraArgs) && options.pipCmdExtraArgs.length > 0) {
130+
options.pipCmdExtraArgs.forEach(cmd => {
131+
const parts = cmd.split(/\s+/, 2);
132+
pipCmd.push(...parts);
133+
});
134+
}
135+
129136
const pipCmds = [pipCmd];
130137
const postCmds = [];
131138
// Check if we're using the legacy --cache-dir command...

0 commit comments

Comments
 (0)