Skip to content

Commit fa3173f

Browse files
jablkosandersn
andauthored
Either clone or pull, don't do both (#35230)
Co-authored-by: Nathan Shively-Sanders <[email protected]>
1 parent 9096724 commit fa3173f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Diff for: src/testRunner/externalCompileRunner.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,11 @@ namespace Harness {
5858
if (!fs.existsSync(submoduleDir)) {
5959
exec("git", ["clone", config.cloneUrl, directoryName], { cwd });
6060
}
61-
exec("git", ["reset", "HEAD", "--hard"], { cwd: submoduleDir });
62-
exec("git", ["clean", "-f"], { cwd: submoduleDir });
63-
exec("git", ["pull", "-f"], { cwd: submoduleDir });
61+
else {
62+
exec("git", ["reset", "HEAD", "--hard"], { cwd: submoduleDir });
63+
exec("git", ["clean", "-f"], { cwd: submoduleDir });
64+
exec("git", ["pull", "-f"], { cwd: submoduleDir });
65+
}
6466

6567
types = config.types;
6668

@@ -337,4 +339,4 @@ ${stderr.replace(/\r\n/g, "\n")}`;
337339
}
338340
return result;
339341
}
340-
}
342+
}

0 commit comments

Comments
 (0)