Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit 6db6730

Browse files
committed
Fix to supoprt Jenkins environment variables.
1 parent 466c0d4 commit 6db6730

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/mathworks/ci/MatlabBuilder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,10 +394,11 @@ private int execMatlabCommand(Run<?, ?> build, FilePath workspace, Launcher laun
394394
if (rel.verLessThan(BASE_MATLAB_VERSION_BATCH_SUPPORT)) {
395395
ListenerLogDecorator outStream = new ListenerLogDecorator(listener);
396396
return launcher.launch().pwd(workspace)
397+
.envs(env)
397398
.cmds(constructDefaultMatlabCommand(isLinuxLauncher)).stderr(outStream)
398399
.join();
399400
} else {
400-
return launcher.launch().pwd(workspace).cmds(constructMatlabCommandWithBatch())
401+
return launcher.launch().pwd(workspace).envs(env).cmds(constructMatlabCommandWithBatch())
401402
.stdout(listener).join();
402403
}
403404
} catch (MatlabVersionNotFoundException e) {

0 commit comments

Comments
 (0)