Skip to content

Commit 685b4af

Browse files
Avoid replacing single quote in special flags that may contain single quote (AST-116875) (#122)
* Avoid replacing single quote in special flags that may contain single quote
1 parent fc1a5b5 commit 685b4af

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/wrapper/ExecutionService.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import CxAsca from "../asca/CxAsca";
2626

2727
let skipValue = false;
2828
const fileSourceFlag = "--file-source"
29+
const scaResolverParamsFlag = "--sca-resolver-params"
2930

3031
function isJsonString(s: string) {
3132
try {
@@ -53,12 +54,12 @@ function transform(n:string) {
5354
return r;
5455
}
5556
// If the current string is "--file-source", set the flag
56-
if (n === fileSourceFlag) {
57+
if (n === fileSourceFlag || n === "-s" || n === scaResolverParamsFlag) {
5758
skipValue = true;
5859
}
5960

6061
let r = "";
61-
if(n) r = n.replace(/"/g, "").replace("/[, ]/g",",");
62+
if(n) r = n.replace(/"'/g, "").replace("/[, ]/g",",");
6263
return r;
6364
}
6465

0 commit comments

Comments
 (0)