Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix a bunch of bugs #25

Merged
merged 10 commits into from
Aug 12, 2023
Merged

Fix a bunch of bugs #25

merged 10 commits into from
Aug 12, 2023

Conversation

pwillis-els
Copy link
Owner

@pwillis-els pwillis-els commented Aug 12, 2023

Fix number of bugs that i've been negligent in pushing...

The biggest one is that 'terraform apply' failures would return 0 no matter what.

The second biggest one is that mktemp on MacOS does not support the -p option, leading to not creating a backup file when running terraform state rm ... commands.

1. Fix bug where "+ cd ..." is printed multiple times. Instead check what the last
   "cd" was set to, and if this one is the same, don't "cd" again.

2. Fix bug where backend config was getting appended to the init command every time
   the _final_vars function was called
Need to have both 'cd' operations follow each other.

Also make revgrep run in a subshell so 'cd' in that command
doesn't negatively effect other commands
If apply errors, the return status was being returned 0.
Instead return the actual return status.
@github-actions github-actions bot added bug Something isn't working maintenance labels Aug 12, 2023
Fixes a bug where 'mktemp -p' does not work on MacOS and the
'terraformsh state rm ...' command results in no backup file
getting created.
@pwillis-els pwillis-els merged commit 5ed6e0f into main Aug 12, 2023
@pwillis-els pwillis-els deleted the fix/backend-bad-append-2 branch August 12, 2023 21:26
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants