diff --git a/__test__/git-auth-helper.test.ts b/__test__/git-auth-helper.test.ts index 2acec38..b58010b 100644 --- a/__test__/git-auth-helper.test.ts +++ b/__test__/git-auth-helper.test.ts @@ -770,6 +770,9 @@ async function setup(testName: string): Promise { return '' }), submoduleSync: jest.fn(), + submoduleStatus: jest.fn(async () => { + return true + }), submoduleUpdate: jest.fn(), tagExists: jest.fn(), tryClean: jest.fn(), diff --git a/__test__/git-directory-helper.test.ts b/__test__/git-directory-helper.test.ts index 70849b5..a783177 100644 --- a/__test__/git-directory-helper.test.ts +++ b/__test__/git-directory-helper.test.ts @@ -423,6 +423,9 @@ async function setup(testName: string): Promise { submoduleForeach: jest.fn(), submoduleSync: jest.fn(), submoduleUpdate: jest.fn(), + submoduleStatus: jest.fn(async () => { + return true + }), tagExists: jest.fn(), tryClean: jest.fn(async () => { return true diff --git a/dist/index.js b/dist/index.js index e83c1b0..e9f5794 100644 --- a/dist/index.js +++ b/dist/index.js @@ -7686,6 +7686,7 @@ class GitCommandManager { submoduleStatus() { return __awaiter(this, void 0, void 0, function* () { const output = yield this.execGit(['submodule', 'status'], true); + core.debug(output.stdout); return output.exitCode === 0; }); } @@ -9445,6 +9446,7 @@ function prepareExistingDirectory(git, repositoryPath, repositoryUrl, clean, ref // Check for submodules and delete any existing files if submodules are present if (!(yield git.submoduleStatus())) { remove = true; + core.info('Bad Submodules found, removing existing files'); } // Clean if (clean) { diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts index 731fbb2..ab07524 100644 --- a/src/git-command-manager.ts +++ b/src/git-command-manager.ts @@ -360,6 +360,7 @@ class GitCommandManager { async submoduleStatus(): Promise { const output = await this.execGit(['submodule', 'status'], true) + core.debug(output.stdout) return output.exitCode === 0 } diff --git a/src/git-directory-helper.ts b/src/git-directory-helper.ts index 848c804..fcd4b60 100644 --- a/src/git-directory-helper.ts +++ b/src/git-directory-helper.ts @@ -84,6 +84,7 @@ export async function prepareExistingDirectory( // Check for submodules and delete any existing files if submodules are present if (!(await git.submoduleStatus())) { remove = true + core.info('Bad Submodules found, removing existing files') } // Clean