Skip to content

Commit 62306bc

Browse files
author
Andy
authored
Fix git submodule update syntax (microsoft#27549)
1 parent 4ed85b7 commit 62306bc

File tree

10 files changed

+11
-11
lines changed

10 files changed

+11
-11
lines changed

src/testRunner/externalCompileRunner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ abstract class ExternalCompileRunnerBase extends RunnerBase {
4040
const timeout = 600_000; // 10 minutes
4141
describe(directoryName, function(this: Mocha.ISuiteCallbackContext) {
4242
this.timeout(timeout);
43-
const cp = require("child_process");
43+
const cp: typeof import("child_process") = require("child_process");
4444

4545
it("should build successfully", () => {
4646
let cwd = path.join(Harness.IO.getWorkspaceRoot(), cls.testDir, directoryName);
@@ -53,7 +53,7 @@ abstract class ExternalCompileRunnerBase extends RunnerBase {
5353
if (reset.status !== 0) throw new Error(`git reset for ${directoryName} failed: ${reset.stderr.toString()}`);
5454
const clean = cp.spawnSync("git", ["clean", "-f"], { cwd: submoduleDir, timeout, shell: true, stdio });
5555
if (clean.status !== 0) throw new Error(`git clean for ${directoryName} failed: ${clean.stderr.toString()}`);
56-
const update = cp.spawnSync("git", ["submodule", "update", "--remote", ".", "--init"], { cwd: submoduleDir, timeout, shell: true, stdio });
56+
const update = cp.spawnSync("git", ["submodule", "update", "--init", "--remote", "."], { cwd: submoduleDir, timeout, shell: true, stdio });
5757
if (update.status !== 0) throw new Error(`git submodule update for ${directoryName} failed: ${update.stderr.toString()}`);
5858

5959
const config = JSON.parse(fs.readFileSync(path.join(cwd, "test.json"), { encoding: "utf8" })) as UserConfig;

tests/cases/user/prettier/prettier

Submodule prettier updated 1789 files

tests/cases/user/webpack/webpack

Submodule webpack updated 1431 files

0 commit comments

Comments
 (0)