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

Commit 767b0bb

Browse files
committed
Fix MatlabCommandRunner
1 parent 3924684 commit 767b0bb

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/main/java/com/mathworks/ci/utilities/MatlabCommandRunner.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*
66
*/
77

8-
import java.io.File;
98
import java.io.IOException;
109
import java.io.InputStream;
1110
import java.io.OutputStream;
@@ -36,16 +35,15 @@ public MatlabCommandRunner(MatlabActionParameters params) throws IOException, In
3635
this.params = params;
3736
this.additionalEnvVars = new HashMap<String,String>();
3837

38+
FilePath workspace = params.getWorkspace();
39+
3940
// Handle case where workspace doesn't exist
40-
if (!params.getWorkspace().exists()) {
41-
params.getWorkspace().mkdirs();
41+
if (!workspace.exists()) {
42+
workspace.mkdirs();
4243
}
4344

4445
// Create MATLAB folder
45-
FilePath matlabFolder = new FilePath(
46-
params.getLauncher().getChannel(), params.getWorkspace().getRemote()
47-
+ File.separator
48-
+ ".matlab");
46+
FilePath matlabFolder = new FilePath(workspace, ".matlab");
4947
matlabFolder.mkdirs();
5048

5149
// Create temp folder

0 commit comments

Comments
 (0)