Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output should go to STDERR #11

Open
js-timbirkett opened this issue May 5, 2020 · 1 comment · May be fixed by #12
Open

Output should go to STDERR #11

js-timbirkett opened this issue May 5, 2020 · 1 comment · May be fixed by #12

Comments

@js-timbirkett
Copy link

When running terragrunt there are 2 lines:

[INFO] Getting version from tgenv-version-name
[INFO] TGENV_VERSION is 0.23.13

These are sent to STDOUT, this causes issues with terragrunt output and terragrunt graph-dependencies when piped into other tools like jq or dot.

PR incoming.

@js-timbirkett js-timbirkett linked a pull request May 5, 2020 that will close this issue
@iainelder
Copy link

@js-timbirkett It seems that this repo is no longer accepting PRs (#19).

There is another implementation of tgenv that avoids this problem by omitting that output.

https://github.com/taosmountain/tgenv

Here's a quick test you can run to check if tgenv is working correctly.

touch terragrunt.hcl
echo 'output "main" { value = "Hello, world!" }' > main.tf

terragrunt init
terragrunt apply --auto-approve

main="$(terragrunt output -raw main)"
echo "${main}"

With this implementation, the output value is mixed up with the debugging info:

$ echo "${main}"
[INFO] Getting version from tgenv-version-name
[INFO] TGENV_VERSION is 0.28.18
Hello, world!

With taosmountain's implementation, it works as you would expect.

$ echo "${main}"
Hello, world!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants