mirror of
https://code.forgejo.org/actions/checkout
synced 2025-05-20 06:03:45 +08:00
Fix Self hosted runner issue wrt bad submodules - solution cleanup working space.
This commit is contained in:
parent
ac59398561
commit
7f14f1d824
3 changed files with 21 additions and 0 deletions
|
@ -41,6 +41,7 @@ export interface IGitCommandManager {
|
|||
submoduleForeach(command: string, recursive: boolean): Promise<string>
|
||||
submoduleSync(recursive: boolean): Promise<void>
|
||||
submoduleUpdate(fetchDepth: number, recursive: boolean): Promise<void>
|
||||
submoduleStatus(): Promise<boolean>
|
||||
tagExists(pattern: string): Promise<boolean>
|
||||
tryClean(): Promise<boolean>
|
||||
tryConfigUnset(configKey: string, globalConfig?: boolean): Promise<boolean>
|
||||
|
@ -357,6 +358,11 @@ class GitCommandManager {
|
|||
await this.execGit(args)
|
||||
}
|
||||
|
||||
async submoduleStatus(): Promise<boolean> {
|
||||
const output = await this.execGit(['submodule', 'status'], true)
|
||||
return output.exitCode === 0
|
||||
}
|
||||
|
||||
async tagExists(pattern: string): Promise<boolean> {
|
||||
const output = await this.execGit(['tag', '--list', pattern])
|
||||
return !!output.stdout.trim()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue