Skip to content

Commit c9511b7

Browse files
committed
1. pass subshell args 2. fix build order in services
1. /bin/sh requires its arguments joined into a single string unlike cmd. 2. services/ depends on a couple of files from server/ but the order was implicit, and changed from jakefile. Now the order is explicit in the tsconfig.
1 parent 5383d91 commit c9511b7

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

Gulpfile.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ const cmdLineOptions = minimist(process.argv.slice(2), {
6868
function exec(cmd: string, args: string[], complete: () => void = (() => {}), error: (e: any, status: number) => void = (() => {})) {
6969
console.log(`${cmd} ${args.join(" ")}`);
7070
// TODO (weswig): Update child_process types to add windowsVerbatimArguments to the type definition
71-
const ex = cp.spawn(isWin ? "cmd" : "/bin/sh", [isWin ? "/c" : "-c", cmd, ...args], { stdio: "inherit", windowsVerbatimArguments: true } as any);
71+
const subshellFlag = isWin ? "/c" : "-c";
72+
const command = isWin ? [cmd, ...args] : [`${cmd} ${args.join(' ')}`];
73+
const ex = cp.spawn(isWin ? "cmd" : "/bin/sh", [subshellFlag, ...command], { stdio: "inherit", windowsVerbatimArguments: true } as any);
7274
ex.on("exit", (code) => code === 0 ? complete() : error(/*e*/ undefined, code));
7375
ex.on("error", error);
7476
}

src/server/tsconfig.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
"stripInternal": true
99
},
1010
"files": [
11+
"../services/shims.ts",
12+
"../services/utilities.ts",
1113
"node.d.ts",
1214
"editorServices.ts",
1315
"protocol.d.ts",

0 commit comments

Comments
 (0)