mirror of
https://github.com/github/codeql-action.git
synced 2026-04-26 16:58:47 +00:00
Test fallback when repo has no submodules
This commit is contained in:
Generated
+2
-6
@@ -104092,12 +104092,8 @@ function hasSubmodules(gitRoot) {
|
||||
}
|
||||
var getFileOidsUnderPath = async function(basePath) {
|
||||
const gitRoot = await getGitRoot(basePath);
|
||||
if (gitRoot === void 0) {
|
||||
throw new Error(
|
||||
`Cannot determine the Git root from ${basePath}.`
|
||||
);
|
||||
}
|
||||
const args = hasSubmodules(gitRoot) ? ["ls-files", "--recurse-submodules", "--stage"] : ["ls-files", "--stage"];
|
||||
const mayHaveSubmodules = gitRoot === void 0 ? true : hasSubmodules(gitRoot);
|
||||
const args = mayHaveSubmodules ? ["ls-files", "--recurse-submodules", "--stage"] : ["ls-files", "--stage"];
|
||||
const stdout = await runGitCommand(
|
||||
basePath,
|
||||
args,
|
||||
|
||||
Reference in New Issue
Block a user