Skip to content

Commit 7afd50a

Browse files
authored
Merge pull request jenkinsci#415 from jglick/status
Handle null `controller` in `DurableTaskStep.Execution.getStatus`
2 parents f6c9e89 + ef9cff7 commit 7afd50a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/org/jenkinsci/plugins/workflow/steps/durable_task/DurableTaskStep.java

+3
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,9 @@ private static final class NewlineSafeTaskListener extends OutputStreamTaskListe
526526
}
527527

528528
@Override public String getStatus() {
529+
if (controller == null) {
530+
return "not yet started";
531+
}
529532
StringBuilder b = new StringBuilder();
530533
try (Timeout timeout = Timeout.limit(2, TimeUnit.SECONDS)) { // CpsThreadDump applies a 3s timeout anyway
531534
FilePath workspace = getWorkspace();

0 commit comments

Comments
 (0)