-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avoid suppressing errors in deferred funcs
This seeks to address issue #129 by exiting nonzero if ever the `defer`'d `switchBackToRemoteFunc` funcs return an error. By using a closure in concert with `errors.Join`, we can join an error returned by the `defer`'d func with any other error(s), surface visibility on all errors, and avoid exiting successfully if ever an error occurs within the `defer`'d func. This is especially helpful in CI/CD pipelines where non-successful `tfmigrate plan` execution likely indicate a problem that should gate the execution of the pipeline. Signed-off-by: Mike Ball <mikedball@gmail.com>
- Loading branch information
Showing
5 changed files
with
42 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters