mirror of
https://github.com/actions/checkout.git
synced 2026-05-03 20:26:19 +00:00
fix: formatting
This commit is contained in:
parent
70f5fe34bd
commit
fbeb4a8af3
@ -8,9 +8,9 @@ import * as path from 'path'
|
|||||||
import * as regexpHelper from './regexp-helper'
|
import * as regexpHelper from './regexp-helper'
|
||||||
import * as stateHelper from './state-helper'
|
import * as stateHelper from './state-helper'
|
||||||
import * as urlHelper from './url-helper'
|
import * as urlHelper from './url-helper'
|
||||||
import { v4 as uuid } from 'uuid'
|
import {v4 as uuid} from 'uuid'
|
||||||
import { IGitCommandManager } from './git-command-manager'
|
import {IGitCommandManager} from './git-command-manager'
|
||||||
import { IGitSourceSettings } from './git-source-settings'
|
import {IGitSourceSettings} from './git-source-settings'
|
||||||
|
|
||||||
const IS_WINDOWS = process.platform === 'win32'
|
const IS_WINDOWS = process.platform === 'win32'
|
||||||
const SSH_COMMAND_KEY = 'core.sshCommand'
|
const SSH_COMMAND_KEY = 'core.sshCommand'
|
||||||
@ -92,7 +92,7 @@ class GitAuthHelper {
|
|||||||
assert.ok(runnerTemp, 'RUNNER_TEMP is not defined')
|
assert.ok(runnerTemp, 'RUNNER_TEMP is not defined')
|
||||||
const uniqueId = uuid()
|
const uniqueId = uuid()
|
||||||
this.temporaryHomePath = path.join(runnerTemp, uniqueId)
|
this.temporaryHomePath = path.join(runnerTemp, uniqueId)
|
||||||
await fs.promises.mkdir(this.temporaryHomePath, { recursive: true })
|
await fs.promises.mkdir(this.temporaryHomePath, {recursive: true})
|
||||||
|
|
||||||
// Copy the global git config
|
// Copy the global git config
|
||||||
const gitConfigPath = path.join(
|
const gitConfigPath = path.join(
|
||||||
@ -258,11 +258,11 @@ class GitAuthHelper {
|
|||||||
const uniqueId = uuid()
|
const uniqueId = uuid()
|
||||||
this.sshKeyPath = path.join(runnerTemp, uniqueId)
|
this.sshKeyPath = path.join(runnerTemp, uniqueId)
|
||||||
stateHelper.setSshKeyPath(this.sshKeyPath)
|
stateHelper.setSshKeyPath(this.sshKeyPath)
|
||||||
await fs.promises.mkdir(runnerTemp, { recursive: true })
|
await fs.promises.mkdir(runnerTemp, {recursive: true})
|
||||||
await fs.promises.writeFile(
|
await fs.promises.writeFile(
|
||||||
this.sshKeyPath,
|
this.sshKeyPath,
|
||||||
this.settings.sshKey.trim() + '\n',
|
this.settings.sshKey.trim() + '\n',
|
||||||
{ mode: 0o600 }
|
{mode: 0o600}
|
||||||
)
|
)
|
||||||
|
|
||||||
// Remove inherited permissions on Windows
|
// Remove inherited permissions on Windows
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user