return non-zero error code when function run sees error#401
return non-zero error code when function run sees error#401jacobsteves merged 2 commits intomainfrom
Conversation
|
I think we stopped auto-updating in this PR, which was released in the 3.65.0 version on August 2. I wonder if that's enough time that it would be okay to ship this PR as the default behaviour. @nickwesselman Do you have an opinion on this? |
jeffcharles
left a comment
There was a problem hiding this comment.
Could we make a case for a breaking change for older versions of the Shopify CLI here? I would imagine we would want older versions of the CLI to error out in these cases. But if not, this seems fine.
src/main.rs
Outdated
|
|
||
| /// Return a non-zero exit code when a module error occurs during the function run. | ||
| #[clap(short = 'n', long)] | ||
| non_zero_exit_code_for_module_errors: bool, |
There was a problem hiding this comment.
This seems like a pretty long flag name to me. Unfortunately I don't have a constructive suggestion for something more succinct.
I think it could be fair to make a case on that. It would make the changes here much nicer. I'll wait to see if Nick has an opinion there. |
fcde9f1 to
a59c72b
Compare
… on success results The exit code function does not return valid JSON which means it will fail with a non-zero exit code. Instead, use a new noop test fixture that does return valid JSON for tests that expect a successful result.
a59c72b to
41d5220
Compare
|
I got confirmation from Nick that we can release this with a changelog without needing a command line option. I'll release a new 7.0 version once this ships. As a side effect of removing the option, some integration tests started failing because the test fixture produced an invalid result. Thats been fixed by this commit. |
We want to support returning a non-zero error code anytime a module sees an error during a run.
Heres an example output: