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

Commit 536bc87

Browse files
authored
Merge pull request #47 from mathworks/git_32_eval_issue
Fixed eval string issue.
2 parents 79ee371 + f228a6b commit 536bc87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,8 +588,8 @@ private String[] getRunnerSwitch() {
588588
+ getInputArguments()
589589
+ ")),catch e,disp(getReport(e,'extended')),exit(1),end";
590590
} else {
591-
runCommand = "try,eval(\"" + getCustomMatlabCommand().replaceAll("\"","\"\"")
592-
+ "\"),catch e,disp(getReport(e,'extended')),exit(1),end,exit";
591+
runCommand = "try,eval('" + getCustomMatlabCommand().replaceAll("'","''")
592+
+ "'),catch e,disp(getReport(e,'extended')),exit(1),end,exit";
593593
}
594594

595595
final String[] runnerSwitch = {"-r", runCommand};

0 commit comments

Comments
 (0)