Either clone or pull, don't do both (#35230)

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
This commit is contained in:
Jack Bates
2020-02-07 10:17:44 -08:00
committed by GitHub
co-authored by Nathan Shively-Sanders
parent 909672450d
commit fa3173f8f6
+6 -4
View File
@@ -58,9 +58,11 @@ namespace Harness {
if (!fs.existsSync(submoduleDir)) {
exec("git", ["clone", config.cloneUrl, directoryName], { cwd });
}
exec("git", ["reset", "HEAD", "--hard"], { cwd: submoduleDir });
exec("git", ["clean", "-f"], { cwd: submoduleDir });
exec("git", ["pull", "-f"], { cwd: submoduleDir });
else {
exec("git", ["reset", "HEAD", "--hard"], { cwd: submoduleDir });
exec("git", ["clean", "-f"], { cwd: submoduleDir });
exec("git", ["pull", "-f"], { cwd: submoduleDir });
}
types = config.types;
@@ -337,4 +339,4 @@ ${stderr.replace(/\r\n/g, "\n")}`;
}
return result;
}
}
}