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

[JENKINS-29470] - Prevent NPE in AbstractProject.checkout when agent disconnects during the build #3094

Merged
merged 4 commits into from Mar 4, 2018
Merged
@@ -1207,7 +1207,13 @@ public boolean checkout(AbstractBuild build, Launcher launcher, BuildListener li
return true; // no SCM

FilePath workspace = build.getWorkspace();
workspace.mkdirs();
if(workspace!=null){
workspace.mkdirs();
}
else{
throw new AbortException(); // workspace is undefined

This comment has been minimized.

Copy link
@oleg-nenashev

oleg-nenashev Oct 27, 2017

Member

The reason should be passed in the exception message. Otherwise the user will not see the root cause in the build log

}


boolean r = scm.checkout(build, launcher, workspace, listener, changelogFile);
if (r) {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.