Skip to content

Commit 9914018

Browse files
authored
Update MATLAB Terminal for the reruns
Windows requires that `matlab -nosplash -desktop` get called each time we want to run a file.
1 parent 9c3fc11 commit 9914018

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: src/MatlabTerminal.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ export default class MatlabTerminal {
3030
this.terminal.sendText(`${this.matlabCommand} ${this.noSplashArg} ${this.noDesktopArg} -sd ${this.workspaceDirectoryPath} -r "run('${relativeFilePath}');"`);
3131
this.hasExecutedOnce = true;
3232
} else {
33-
this.terminal.sendText(`run('${relativeFilePath}')`);
33+
if (process.platform === 'win32') {
34+
this.terminal.sendText(`${this.matlabCommand} ${this.noSplashArg} ${this.noDesktopArg} -r "run('${relativeFilePath}');"`);
35+
} else {
36+
this.terminal.sendText(`${rerun}run('${relativeFilePath}')`);
37+
}
3438
}
3539
this.terminal.show(true);
3640
}
@@ -40,4 +44,4 @@ export default class MatlabTerminal {
4044
this.terminal.sendText(`cd ${dir}`);
4145
this.workspaceDirectoryPath = dir;
4246
}
43-
}
47+
}

0 commit comments

Comments
 (0)