Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make nake return the status code of a compilation #47

Open
define-private-public opened this issue Dec 27, 2016 · 3 comments
Open

make nake return the status code of a compilation #47

define-private-public opened this issue Dec 27, 2016 · 3 comments

Comments

@define-private-public
Copy link

Usually I like to use make like this:

make && ./a.out

Where if the compilation fails, it will not run a.out. I tried doing this with nake, e.g.:

nake && ./test

But regardless if the compilation failed or not, nake will always return 0, meaning that what's after the && will always run. Which sucks because the executable might not reflect the changes I just made.

Can you add this into nake? I would be very appreciative of this.

@gradha
Copy link
Contributor

gradha commented Dec 27, 2016

Are you using direShell()?:

import nake

task "failure", "always fails":
  echo "Let's do something good"
  dire_shell "nim c special.nim"
  echo "Happy Nim!"

task "success", "too big to fail":
  echo "I love rescuing private banks with public money"
  shell "let people complain"
  echo "Banks rescued!"

task default_task, "Lists stuff":
  list_tasks()

@define-private-public
Copy link
Author

No I wasn't.

@define-private-public
Copy link
Author

Okay, In wasn't away of that and it gives off of the effect that I want. Can I recommend changing the example in the README to use direShell() instead of shell()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants