Skip to content

Commit f62db63

Browse files
committed
Inject EXECUTOR_NUMBER=UNKNOWNEXECUTOR if the executor is not available.
Examples: (polling, workspace cleanup, etc) Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
1 parent 50a9daf commit f62db63

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/hudson/plugins/perforce/utils/NodeSubstitutionHelper.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ public class NodeSubstitutionHelper {
8989
if (t instanceof Executor) {
9090
Executor e = (Executor) t;
9191
target.put("EXECUTOR_NUMBER", String.valueOf(e.getNumber()));
92+
} else {
93+
target.put("EXECUTOR_NUMBER", "UNKNOWNEXECUTOR");
9294
}
9395

9496
// Get environment

0 commit comments

Comments
 (0)