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
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))
+ if len(folder) > 0:
+ path = "{}/{}".format(CURRENT_DIR, folder[0])
26
if not os.path.exists(path):
27
os.makedirs(path)
28
aws_lambda.init(path)
0 commit comments