Errors are printed twice
vieiralucas opened this issue · 0 comments
vieiralucas commented
For some reason we print the errors twice, we print the error, then we print help (i don't think this is necessary), then we print the error once again.
This happens for all commands, not just spawn.
Example with spawn:
> layerform spawn eks
✓ Instance "U6jvvBcw32X9ika5nm4aMb" of layer "eks" ready
Error: fail to spawn layer: fail to terraform apply: exit status 1
Error: creating Amazon S3 (Simple Storage) Bucket (eks-bucket-pv76pd56): BucketAlreadyOwnedByYou: Your previous request to create the named bucket succeeded and you already own it.
status code: 409, request id: ****, host id: ****
with module.eks.aws_s3_bucket.eks_bucket,
on eks/main.tf line 22, in resource "aws_s3_bucket" "eks_bucket":
22: resource "aws_s3_bucket" "eks_bucket" {
Usage:
layerform spawn <layer> [desired_id] [flags]
Flags:
--base stringToString a map of underlying layers and their IDs to place the layer on top of (default [])
-h, --help help for spawn
--var stringArray a map of variables for the layer's Terraform files. I.e. 'foo=bar,baz=qux'
fail to spawn layer: fail to terraform apply: exit status 1
Error: creating Amazon S3 (Simple Storage) Bucket (eks-bucket-pv76pd56): BucketAlreadyOwnedByYou: Your previous request to create the named bucket succeeded and you already own it.
status code: 409, request id: ****, host id: ****
with module.eks.aws_s3_bucket.eks_bucket,
on eks/main.tf line 22, in resource "aws_s3_bucket" "eks_bucket":
22: resource "aws_s3_bucket" "eks_bucket" {