Build successfull even with unsuccessfull install script
I use a Powershell install script.
During the script an exception occurs and I want to stop the
build.
I've tried Break
and Exit
but the build
is still reported as successful.
[https://ci-beta.appveyor.com/project/BergWerkGIS/node-mapnik/build/...]
How can I stop the build when an exception occurs?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Wilhelm Berg on 05 Mar, 2014 02:14 PM
[SOLVED] Just re-throw the exception and the build stops.
PowerShell script is considered successful if it's finished without exception.
[http://www.appveyor.com/docs2/build-configuration#script-blocks]Support Staff 2 Posted by Feodor Fitsner on 05 Mar, 2014 05:58 PM
Thanks for the update!
3 Posted by Wilhelm Berg on 20 Aug, 2014 11:09 AM
Now I'm having the same problem with .BAT files.
I'm calling several .BAT files from my yml.
Error catching in the BAT files looks like this (appreviated):
However, execution does not stop.
https://ci.appveyor.com/project/BergWerkGIS/build-gdal-deps/build/1...
How can I stop the build, when an error orrcurs?
Support Staff 4 Posted by Feodor Fitsner on 20 Aug, 2014 02:34 PM
Will take a look.—
Sent from Mailbox
Support Staff 5 Posted by Feodor Fitsner on 21 Aug, 2014 03:25 AM
I'm afraid there is a problem with your
.bat
. You setting%ERRORLEVEL%
back to 0 with the lastcd
.My test results:
6 Posted by Wilhelm Berg on 21 Aug, 2014 10:39 AM
Ohhh, of course.
Thanks a bunch.
It's always the same:
quick-won't-do-any-harm-last-minute-changes break everything.
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:47 AM.