Open korenyoni opened 2 years ago
A name field for an exec block would be helpful in cleaning up output when a non-exit zero code is intentional.
name
For example:
➜ my-cli component init eks/irsa/external-dns . Component . already initialized Error: command "bash -c if [[ -d . ]] && [[ "false" == "false" ]]; then echo "Component . already initialized" exit 1 fi if [[ -d /Users/yonatankoren/software/example/terragrunt/_components/eks/irsa/external-dns ]]; then mkdir -p . cat /Users/yonatankoren/software/software/example/terragrunt/_components/eks/irsa/external-dns/terragrunt.hcl | sed "s!COMPONENT!eks/irsa/external-dns!g" > ./terragrunt.hcl # use delimiter other than / (which exists in component names) else echo "Error: component does not exist" exit 1 fi ": exit status 1
If the exec block accepted a name, it could look something like this:
exec
exec { name = "init-component" command = "bash" ...
Then when a non-exit zero code occurs, only the name is reported and not the whole command:
Component . already initialized Error: init-component: exit status 1
A
name
field for an exec block would be helpful in cleaning up output when a non-exit zero code is intentional.For example:
If the
exec
block accepted a name, it could look something like this:Then when a non-exit zero code occurs, only the
name
is reported and not the whole command: