We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95cd2b8 commit cf0c435Copy full SHA for cf0c435
scripts/lambda
@@ -16,8 +16,16 @@ def cli():
16
17
18
@click.command(help="Create a new function for Lambda.")
19
-def init():
20
- aws_lambda.init(CURRENT_DIR)
+@click.argument('folder', default=False)
+def init(folder):
21
+ path = CURRENT_DIR
22
+ if folder:
23
+ path = "{}/{}".format(CURRENT_DIR, folder)
24
+ if os.path.isfile(path):
25
+ raise click.ClickException("{} is a file".format(path))
26
+ if not os.path.exists(path):
27
+ os.makedirs(path)
28
+ aws_lambda.init(path)
29
30
31
@click.command(help="Bundles package for deployment.")
0 commit comments