I posted a workaround in the issue. You can change the exit code behavior 
in inspec by using the --no-distinct-exit flag

[--distinct-exit], [--no-distinct-exit]            # Exit with code 101 if 
any tests fail, and 100 if any are skipped (default). If disabled, exit 0 
on skips and 1 for failures.



"extra_arguments": [ "--no-distinct-exit" ]

Here is how I'm using it
"type": "inspec",
"user": "ec2-user",
"profile": "https://github.com/dev-sec/linux-patch-baseline.git";,
"extra_arguments": [ "-l", "debug", "--no-distinct-exit", "--sudo", 
"--reporter", "cli", "junit:./results/inspec.xml" ]


-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/8826bee9-2d88-4593-a430-c311adf54fe3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to