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:
parent
70525c3952
commit
8461cead75
3 changed files with 35 additions and 27 deletions
|
|
@ -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, '/')
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue