Skip to content

Commit 1a5b628

Browse files
committed
Avoid using shell for autify-with-proxy
1 parent 9d6be7c commit 1a5b628

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

integration-test/src/bin/autify-with-proxy.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ const getPollyMode = (): PollyMode => {
2424
};
2525

2626
const getAutifyCli = (): string => {
27-
const autify = AUTIFY_CLI_PATH ?? "autify";
27+
let autify = AUTIFY_CLI_PATH ?? "autify";
28+
if (process.platform === "win32") {
29+
autify += ".cmd";
30+
}
31+
2832
if (!existsSync(autify) && !which.sync(autify))
2933
throw new Error(`Invalid autify-cli path: ${autify}`);
3034
return autify;
@@ -130,7 +134,6 @@ const autifyWithProxy = async (originalArgs: string[]) => {
130134
AUTIFY_MOBILE_BASE_PATH: `http://127.0.0.1:${mobileProxy.port}/api/v1/`,
131135
},
132136
stdio: "inherit",
133-
shell: true,
134137
});
135138
return new Promise<ProcStatus>((resolve, reject) => {
136139
proc.on("close", async (code, signal) => {

integration-test/src/commands.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,7 @@ const concatFlagAndValue = (args: string[]) => {
2121
flag = arg;
2222
continue;
2323
} else {
24-
if (flag === "-r" || flag === "--url-replacements") {
25-
newArgs.push(`${flag}="${arg}"`);
26-
} else {
27-
newArgs.push(`${flag}=${arg}`);
28-
}
29-
24+
newArgs.push(`${flag}=${arg}`);
3025
flag = null;
3126
continue;
3227
}

0 commit comments

Comments
 (0)