Using Packer 1.3.1, packer fix Packerfile.in > Packerfile.out
would exit 1
without printing anything to the terminal. That is first of all confusing as most users don't have a customized shell which shows good/bad exit code, and second, it appends the error messages to the output file which makes it an invalid Packerfile. Other commands also log errors to stderr.
Thanks for opening; I think this is essentially a duplicate of #6470
I believe this should be now solved with this : https://github.com/hashicorp/packer/pull/7466/files#diff-1fca62045a851051294784d1be9ba027R130
Closing this one since is a duplicate and it seems to be fixed by the code @azr shared above. If this is still an issue we can reopen later.
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
Closing this one since is a duplicate and it seems to be fixed by the code @azr shared above. If this is still an issue we can reopen later.