mirror of
https://code.forgejo.org/actions/checkout.git
synced 2026-03-28 16:03:07 +00:00
fix: review nits
This commit is contained in:
parent
70525c3952
commit
8461cead75
3 changed files with 35 additions and 27 deletions
5
dist/index.js
vendored
5
dist/index.js
vendored
|
|
@ -411,10 +411,11 @@ class GitAuthHelper {
|
|||
let gitDir;
|
||||
try {
|
||||
const constructed = path.join(this.git.getWorkingDirectory(), '.git');
|
||||
gitDir = fs.realpathSync(constructed).replace(/\\/g, '/');
|
||||
const resolved = yield fs.promises.realpath(constructed);
|
||||
gitDir = resolved.replace(/\\/g, '/');
|
||||
}
|
||||
catch (_a) {
|
||||
// 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