fix(repo-identity): use native realpath on Windows to resolve 8.3 short paths (#1960)
Use realpathSync.native() on Windows in canonicalizeExistingPath to resolve 8.3 short names (RUNNER~1 → runneradmin). Fixes isInheritedRepo path comparison failures on Windows CI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
09f3a5f970
commit
d40ed851a2
1 changed files with 2 additions and 1 deletions
|
|
@ -164,7 +164,8 @@ function getRemoteUrl(basePath: string): string {
|
|||
*/
|
||||
function canonicalizeExistingPath(path: string): string {
|
||||
try {
|
||||
return realpathSync(path);
|
||||
// Use native realpath on Windows to resolve 8.3 short paths (e.g. RUNNER~1)
|
||||
return process.platform === "win32" ? realpathSync.native(path) : realpathSync(path);
|
||||
} catch {
|
||||
return resolve(path);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue