Skip to content

Commit 2917ae9

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 31f081b + 4375f14 commit 2917ae9

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

package-lock.json

+13-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/set-script.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const interpreter = new DslInterpreter(descriptors, true);
3737
//get all commands
3838
const cmd = fs.readFileSync('./__test__/dry-run-input.txt', 'utf8');
3939
// split by new line
40-
const cmdList = cmd.split('\n');
40+
const cmdList = cmd.split("\\n");
4141
console.log(cmdList);
4242
4343
let output = "";
@@ -46,11 +46,11 @@ for (let i = 0; i < cmdList.length; i++) {
4646
try {
4747
let funcCallResult = await interpreter.interpret(cmd);
4848
console.log(funcCallResult);
49-
output += JSON.stringify({status: 'success', result: funcCallResult}) + '\n';
49+
output += JSON.stringify({status: 'success', result: funcCallResult}) + "\\n";
5050
// print ok or success
5151
}
5252
catch (e) {
53-
output += JSON.stringify({status: 'error', result: e}) + '\n';
53+
output += JSON.stringify({status: 'error', result: e}) + "\\n";
5454
}
5555
}
5656

0 commit comments

Comments
 (0)