1
0
Fork 0
mirror of https://github.com/actions/checkout.git synced 2025-07-12 08:40:45 +00:00

add the ability to disable core.autocrlf

This commit is contained in:
Vincent Rischmann 2021-07-12 21:37:39 +02:00
parent 25a956c84d
commit 931cbfe4af
5 changed files with 28 additions and 0 deletions

View file

@ -44,6 +44,7 @@ export interface IGitCommandManager {
tryClean(): Promise<boolean>
tryConfigUnset(configKey: string, globalConfig?: boolean): Promise<boolean>
tryDisableAutomaticGarbageCollection(): Promise<boolean>
tryDisableAutocrlf(): Promise<boolean>
tryGetFetchUrl(): Promise<string>
tryReset(): Promise<boolean>
}
@ -358,6 +359,14 @@ class GitCommandManager {
return output.exitCode === 0
}
async tryDisableAutocrlf(): Promise<boolean> {
const output = await this.execGit(
['config', '--local', 'core.autocrlf', 'false'],
true
)
return output.exitCode === 0
}
async tryGetFetchUrl(): Promise<string> {
const output = await this.execGit(
['config', '--local', '--get', 'remote.origin.url'],