Statiq programs always returns 0, even when errors occurred #191
-
With the current example code, Statiq programs always return exit code 0. This means that CI/CD pipelines and other deployment methods are unable to automatically detect that something went wrong, and may proceed with trying to deploy the site anyway. An easy solution to this is to change the example code to return the exit code that Statiq generates. For example, the current await Bootstrapper
.Factory
.CreateDocs(args)
.RunAsync(); is easily changed to return await Bootstrapper
.Factory
.CreateDocs(args)
.RunAsync(); Is it worth changing the suggested code in the relevant places to make troubleshooting and automated deployment of Statiq sites easier? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You're absolutely right, all examples should be returning the exit code. Going through the documentation, I'm trying to find anywhere that it's not - I'm assuming you're talking about things like the partial second code sample here (as opposed to the first example, which does return the result code)? |
Beta Was this translation helpful? Give feedback.
You're absolutely right, all examples should be returning the exit code. Going through the documentation, I'm trying to find anywhere that it's not - I'm assuming you're talking about things like the partial second code sample here (as opposed to the first example, which does return the result code)?