mirror of
https://github.com/actions/checkout.git
synced 2025-03-14 04:14:10 +00:00
Fix linting and formatting issues
This commit is contained in:
parent
dc3f9aa6d6
commit
287da9b78e
@ -136,7 +136,12 @@ class GitAuthHelper {
|
||||
await this.git.tryConfigUnset(this.insteadOfKey, ConfigScope.System)
|
||||
if (!this.settings.sshKey) {
|
||||
for (const insteadOfValue of this.insteadOfValues) {
|
||||
await this.git.config(this.insteadOfKey, insteadOfValue, ConfigScope.System, true)
|
||||
await this.git.config(
|
||||
this.insteadOfKey,
|
||||
insteadOfValue,
|
||||
ConfigScope.System,
|
||||
true
|
||||
)
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
@ -294,7 +299,7 @@ class GitAuthHelper {
|
||||
await this.git.config(
|
||||
this.tokenConfigKey,
|
||||
this.tokenPlaceholderConfigValue,
|
||||
configScope,
|
||||
configScope
|
||||
)
|
||||
|
||||
// Replace the placeholder
|
||||
|
@ -13,9 +13,9 @@ import {GitVersion} from './git-version'
|
||||
export const MinimumGitVersion = new GitVersion('2.18')
|
||||
|
||||
export enum ConfigScope {
|
||||
Local = "local",
|
||||
Global = "global",
|
||||
System = "system",
|
||||
Local = 'local',
|
||||
Global = 'global',
|
||||
System = 'system'
|
||||
}
|
||||
|
||||
export interface IGitCommandManager {
|
||||
@ -181,7 +181,10 @@ class GitCommandManager {
|
||||
configScope?: ConfigScope,
|
||||
add?: boolean
|
||||
): Promise<void> {
|
||||
const args: string[] = ['config', configScope ? `--${configScope}` : '--local']
|
||||
const args: string[] = [
|
||||
'config',
|
||||
configScope ? `--${configScope}` : '--local'
|
||||
]
|
||||
if (add) {
|
||||
args.push('--add')
|
||||
}
|
||||
|
@ -50,7 +50,12 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
|
||||
)
|
||||
|
||||
await git
|
||||
.config('safe.directory', settings.repositoryPath, ConfigScope.System, true)
|
||||
.config(
|
||||
'safe.directory',
|
||||
settings.repositoryPath,
|
||||
ConfigScope.System,
|
||||
true
|
||||
)
|
||||
.catch(error => {
|
||||
core.info(
|
||||
`Failed to initialize safe directory with error: ${error}`
|
||||
|
Loading…
x
Reference in New Issue
Block a user