prezi / pride

Manages a pride of Gradle modules
Other
71 stars 13 forks source link

Don't exit from main() when it's not necessary #124

Closed ghost closed 9 years ago

ghost commented 9 years ago

This change would help calling Pride from another JVM application

lptr commented 9 years ago

This only works when Pride is successful. I'd recommend something like this:

lptr commented 9 years ago
public static void main(String... args) {
    System.exit(execute(args));
}

public static int execute(String... args) {
    // ...
    return exitValue;
}
lptr commented 9 years ago

This way you can call PrideCli.execute() instead of main(), and you always get back a proper exit value.