-
Notifications
You must be signed in to change notification settings - Fork 35
The job should fail when tofu fails by default #101
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Here is an example which should fail the job however it doesn't
$ tofu fmt --recursive --diff --check; echo $?
╷
│ Error: Invalid expression
│
│ on repos/repos.tf line 26, in locals:
│ 26: .myrepo = {
│
│ Expected the start of an expression, but found an invalid expression token.
╵
2presumably because of this
setup-opentofu/wrapper/tofu.js
Line 47 in 26ccb9b
| if (exitCode === 0 || exitCode === 2) { |
One could argue that the default behavior should be for the job to fail if the executable fails. However, that isn't the case with the wrapper enabled by default. This leads to errors going unnoticed for a long time. I believe ignoring the exit code should be a conscious choice made by the user.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Fields
Give feedbackNo fields configured for issues without a type.