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 cf0c435 commit 1b0ee0eCopy full SHA for 1b0ee0e
scripts/lambda
@@ -16,13 +16,11 @@ def cli():
16
17
18
@click.command(help="Create a new function for Lambda.")
19
-@click.argument('folder', default=False)
+@click.argument('folder', nargs=-1, type=click.Path(file_okay=False, writable=True))
20
definit(folder):
21
path=CURRENT_DIR
22
-iffolder:
23
-path="{}/{}".format(CURRENT_DIR, folder)
24
-ifos.path.isfile(path):
25
-raiseclick.ClickException("{} is a file".format(path))
+iflen(folder) >0:
+path="{}/{}".format(CURRENT_DIR, folder[0])
26
ifnotos.path.exists(path):
27
os.makedirs(path)
28
aws_lambda.init(path)
0 commit comments