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:
parent
25a956c84d
commit
931cbfe4af
5 changed files with 28 additions and 0 deletions
|
@ -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'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue