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

Commit f228a6b

Browse files
committed
Fixed eval string issue.
1 parent 9d6054e commit f228a6b

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)