generated from amazon-archives/__template_MIT-0
-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Description
This looks like a useful action, thanks for the extra effort to make deploying lambdas easy.
I haven’t tried it yet; at work we have our own deployment script written in python which was intended to replace SAM, addressing our specific needs.
In any case, I am puzzled by the code here:
Lines 53 to 65 in 277fdfd
| // Determine if function exists | |
| let functionExists; | |
| if (!dryRun) { | |
| core.info(`Checking if ${functionName} exists`); | |
| functionExists = await checkFunctionExists(client, functionName); | |
| } | |
| if (dryRun) { | |
| core.info('DRY RUN MODE: No AWS resources will be created or modified'); | |
| if (!functionExists) { | |
| core.setFailed('DRY RUN MODE can only be used for updating function code of existing functions'); | |
| return; | |
| } | |
| } |
Does it work as expected? It seems to me that if dryRun is truthy then functionExists is guaranteed to be undefined on line 61 and the function will exit with a warning. Perhaps the conditional on line 55 should be removed, so checkFunctionExists will run in all cases?
Maybe I’m missing something?
Metadata
Metadata
Assignees
Labels
No labels