Skip to content

Commit fc05359

Browse files
committed
fix ci issue
1 parent d419658 commit fc05359

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/winapp-npm/test/package-manager-detector.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,11 @@ test('resolvePackageManagerPath returns the absolute path of a launcher found on
138138
fs.writeFileSync(launcher, '');
139139
withEnv({ PATH: dir, PATHEXT: '.COM;.EXE;.BAT;.CMD' }, () => {
140140
const resolved = resolvePackageManagerPath('npm');
141-
// On Windows the returned extension casing follows PATHEXT (.CMD) while the
142-
// file is npm.cmd; both refer to the same file on a case-insensitive FS.
143-
assert.equal(resolved?.toLowerCase(), launcher.toLowerCase());
141+
// resolvePackageManagerPath calls fs.realpathSync.native to collapse 8.3 short
142+
// names and symlinks; CI runners ship TEMP as a short path (RUNNER~1) so the
143+
// expected value must go through the same canonicalisation.
144+
const expected = fs.realpathSync.native(launcher);
145+
assert.equal(resolved?.toLowerCase(), expected.toLowerCase());
144146
});
145147
} finally {
146148
fs.rmSync(dir, { recursive: true, force: true });

0 commit comments

Comments
 (0)