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

Support ignoreExitValue on NodeTask #8

Closed
konrad-garus opened this issue Feb 10, 2014 · 5 comments
Closed

Support ignoreExitValue on NodeTask #8

konrad-garus opened this issue Feb 10, 2014 · 5 comments

Comments

@konrad-garus
Copy link

ExecSpec in core Gradle supports the ignoreExitValue flag. When set, it ignores exit value of the process (otherwise an exception is thrown). Please expose this flag in NodeTask as well.

Optionally, also add a way to customize the ExecSpec directly. For instance accept a closure to run on the spec directly, like this in ExecRunner:

return this.project.exec( {
            it.executable = realExec
            it.args = realArgs

            if ( this.environment != null )
            {
                it.environment = this.environment
            }

            if ( this.workingDir != null )
            {
                it.workingDir = this.workingDir
            }
            // execOverrides is the new closure:
            execOverrides(it)
        } )

Why is it needed? I use it to run integration tests, and I want to shut down my server after running the tests. The tests may fail, but I don't want the build to stop.

@konrad-garus
Copy link
Author

If you're interested I can create a PR for it.

@srs
Copy link
Owner

srs commented Feb 10, 2014

Yes. I welcome a pull request :-)

// srs

Den 10. feb. 2014 kl. 11:11 skrev Konrad Garus notifications@github.com:

If you're interested I can create a PR for it.


Reply to this email directly or view it on GitHub.

@konrad-garus
Copy link
Author

With the closure as well, or just the direct ignoreExitValue property? It's your call on the API.

@srs
Copy link
Owner

srs commented Feb 15, 2014

A closure would be more flexible so let's try that :-)

@konrad-garus
Copy link
Author

It's actually a fix on the Node plugin: srs/gradle-node-plugin#6

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