3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2024-12-17 13:47:20 +00:00

fix: bug with retrieving submodules (#1169)

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
This commit is contained in:
Tonye Jack 2023-05-25 15:26:13 -06:00 committed by GitHub
parent 4e23a965c8
commit 1c2673b763
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 6 deletions

BIN
dist/index.js generated vendored

Binary file not shown.

BIN
dist/index.js.map generated vendored

Binary file not shown.

View file

@ -205,10 +205,19 @@ export const submoduleExists = async ({
}: {
cwd: string
}): Promise<boolean> => {
const {stdout} = await exec.getExecOutput('git', ['submodule', 'status'], {
cwd,
silent: false
})
const {stdout, exitCode} = await exec.getExecOutput(
'git',
['submodule', 'status'],
{
cwd,
ignoreReturnCode: true,
silent: false
}
)
if (exitCode !== 0) {
return false
}
return stdout.trim() !== ''
}
@ -261,8 +270,6 @@ export const getSubmodulePath = async ({
}: {
cwd: string
}): Promise<string[]> => {
// git submodule status | awk '{print $2}'
const {exitCode, stdout, stderr} = await exec.getExecOutput(
'git',
['submodule', 'status'],