How to ignore exit codes of a cmd
I have created this PR:
https://github.com/oxyplot/oxyplot/pull/267/files
As you can see it has failed because some projects don't produce PDB's (which is fine for me). But the tool returns -1 because it allows people to use a strict mode to check for all projects. In this case it's not necessary, but I don't want the build to fail on a non-0 exit code. How can I allow -1 to be returned?
Thanks!
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
Support Staff 1 Posted by Feodor Fitsner on 01 Dec, 2014 05:29 PM
A quick idea - you can do a "wrapping" batch file, say
gitlink.cmd
and set exit code to 0 before exit.2 Posted by Geert van Horri... on 02 Dec, 2014 04:38 PM
Good idea. In the meantime I have decided to just make it work on all projects, but I will keep this in mind until next time.
3 Posted by ferventcoder on 30 Apr, 2015 09:45 PM
You should do this -
command && exit 0
Proof that it works https://ci.appveyor.com/project/puppetlabs/puppetlabs-acl/build/1.1...
Look at the next few lines, that was throwing errors and exiting with non-zero exit code
4 Posted by jeff on 18 Dec, 2017 02:50 AM
Pretty sure that should be:
command & exit 0
with only a single ampersand. Otherwise, it stops when the command stops and that is the error code you get.
5 Posted by ferventcoder on 01 Jan, 2018 09:17 PM
Hi Jeff,
You are likely correct there.
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:25 AM.