When passing an argument that only applies to one of the aws commands, like "file-exists-behavior, which applies to Create Deployment, but not to get application - the deployment will fail.
To Reproduce
Add the argument --file-exists-behaviour OVERWRITE to the deploy job
Expected behavior
The argument is used if it's relevant, and the deployment succeeds at overwriting files.
Additional context
Error in the ensure-application-created step:
#!/bin/bash -eo pipefail
set +e
aws deploy get-application --application-name Drupal-test --file-exists-behavior=OVERWRITE
if [ $? -ne 0 ]; then
set -e
echo "No application named Drupal-test found. Trying to create a new one"
aws deploy create-application --application-name Drupal-test --file-exists-behavior=OVERWRITE
else
set -e
echo "Application named Drupal-test already exists. Skipping creation."
fi
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
Unknown options: --file-exists-behavior=OVERWRITE
No application named Drupal-test found. Trying to create a new one
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
Unknown options: --file-exists-behavior=OVERWRITE
Exited with code exit status 255
CircleCI received exit code 255
Orb Version 1.0.0
Describe the bug
When passing an argument that only applies to one of the aws commands, like "
file-exists-behavior
, which applies to Create Deployment, but not to get application - the deployment will fail.To Reproduce
Add the argument
--file-exists-behaviour OVERWRITE
to the deploy jobExpected behavior
The argument is used if it's relevant, and the deployment succeeds at overwriting files.
Additional context
Error in the
ensure-application-created
step:Syntax used in my job: