3
0
Fork 0
mirror of https://code.forgejo.org/actions/checkout.git synced 2026-06-18 02:46:26 +00:00

fix: review nits

This commit is contained in:
Drew Ballance 2026-03-25 12:54:48 -05:00
parent 70525c3952
commit 8461cead75
No known key found for this signature in database
GPG key ID: FFF2E6A4496D5858
3 changed files with 35 additions and 27 deletions

View file

@ -371,9 +371,10 @@ class GitAuthHelper {
let gitDir: string
try {
const constructed = path.join(this.git.getWorkingDirectory(), '.git')
gitDir = fs.realpathSync(constructed).replace(/\\/g, '/')
const resolved = await fs.promises.realpath(constructed)
gitDir = resolved.replace(/\\/g, '/')
} catch {
// Fall back to constructed path if realpathSync fails
// Fall back to constructed path if realpath fails
gitDir = path.join(this.git.getWorkingDirectory(), '.git')
gitDir = gitDir.replace(/\\/g, '/')
}