mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-12 20:25:48 -06:00
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.
This commit is contained in:
parent
5383d91b60
commit
c9511b736e
@ -68,7 +68,9 @@ const cmdLineOptions = minimist(process.argv.slice(2), {
|
||||
function exec(cmd: string, args: string[], complete: () => void = (() => {}), error: (e: any, status: number) => void = (() => {})) {
|
||||
console.log(`${cmd} ${args.join(" ")}`);
|
||||
// TODO (weswig): Update child_process types to add windowsVerbatimArguments to the type definition
|
||||
const ex = cp.spawn(isWin ? "cmd" : "/bin/sh", [isWin ? "/c" : "-c", cmd, ...args], { stdio: "inherit", windowsVerbatimArguments: true } as any);
|
||||
const subshellFlag = isWin ? "/c" : "-c";
|
||||
const command = isWin ? [cmd, ...args] : [`${cmd} ${args.join(' ')}`];
|
||||
const ex = cp.spawn(isWin ? "cmd" : "/bin/sh", [subshellFlag, ...command], { stdio: "inherit", windowsVerbatimArguments: true } as any);
|
||||
ex.on("exit", (code) => code === 0 ? complete() : error(/*e*/ undefined, code));
|
||||
ex.on("error", error);
|
||||
}
|
||||
|
||||
@ -8,6 +8,8 @@
|
||||
"stripInternal": true
|
||||
},
|
||||
"files": [
|
||||
"../services/shims.ts",
|
||||
"../services/utilities.ts",
|
||||
"node.d.ts",
|
||||
"editorServices.ts",
|
||||
"protocol.d.ts",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user