Skip to content

Commit cccb7c3

Browse files
committed
fix: Fix help output for requirements container command
1 parent e7e9a6a commit cccb7c3

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

index.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ class ServerlessPythonRequirements {
118118

119119
this.commands = {
120120
requirements: {
121-
usage: 'Serverless plugin to bundle Python packages',
122-
lifecycleEvents: ['requirements'],
123121
commands: {
124122
clean: {
125123
usage: 'Remove .requirements and requirements.zip',
@@ -138,6 +136,15 @@ class ServerlessPythonRequirements {
138136
}
139137
};
140138

139+
if (this.serverless.cli.generateCommandsHelp) {
140+
Object.assign(this.commands.requirements, {
141+
usage: 'Serverless plugin to bundle Python packages',
142+
lifecycleEvents: ['requirements']
143+
});
144+
} else {
145+
this.commands.requirements.type = 'container';
146+
}
147+
141148
const isFunctionRuntimePython = args => {
142149
// If functionObj.runtime is undefined, python.
143150
if (!args[1].functionObj || !args[1].functionObj.runtime) {

0 commit comments

Comments
 (0)