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

Fix terraspace output to not add extra newlines #139

Merged
merged 1 commit into from
Sep 30, 2021
Merged

Conversation

tongueroo
Copy link
Contributor

This is a 🐞 bug fix.

  • I've added tests (if it's a bug, feature or enhancement)
  • I've adjusted the documentation (if it's a feature or enhancement)
  • The test suite passes (run bundle exec rspec to verify this)

Summary

When there's lots of output from terraform show, newlines are added between each stream chunk. This removes the "random" newlines and makes sure that output from terraspace show exactly matches terraform show.

Context

#126

How to Test

Find a stack that produces rather large output. Compare the terraspace show vs terraform show output. They should be exactly the same. Example:

$ terraspace show vpc --json > /tmp/a.json
Building .terraspace-cache/us-west-2/dev/stacks/vpc
Built in .terraspace-cache/us-west-2/dev/stacks/vpc
Current directory: .terraspace-cache/us-west-2/dev/stacks/vpc
=> terraform show -json
$ cd .terraspace-cache/us-west-2/dev/stacks/vpc ; terraform show -json > /tmp/b.json ; cd -
$ diff /tmp/a.json /tmp/b.json
$ 

Version Changes

Patch

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 this pull request may close these issues.

1 participant