tag:help.appveyor.com,2012-11-13:/discussions/questions/15927-compile-errors-does-not-fail-the-jobAppVeyor: Discussion 2018-08-25T02:25:55Ztag:help.appveyor.com,2012-11-13:Comment/443847512017-12-27T07:03:44Z2017-12-27T07:03:44ZCompile errors does not fail the job<div><p>Hi</p>
<p>It seems that failing to build a binary does not fail the job as show in <a href="https://ci.appveyor.com/project/obiltschnig/poco/build/build%20data2sql-2708/job/iejcslfeq3hs728n">https://ci.appveyor.com/project/obiltschnig/poco/build/build%20data...</a></p>
<p>What is missing for making the job failed if there are compile error?</p>
<p>TIA</p></div>zosrothkotag:help.appveyor.com,2012-11-13:Comment/443847512017-12-27T20:46:57Z2017-12-27T20:46:57ZCompile errors does not fail the job<div><p>PowerShell script is happy as long as last command is happy. To avoid those failed positives in the future, use either cmd, or check exit code after every command (or only commands which most probably can fail) in PowerShell (something like <code>if ($lastexitcode -ne 0){ exit $lastexitcode }</code>).</p></div>Ilya Finkelshteyn