Skip to content

Commit fd27165

Browse files
kfarnungaddaleax
authored andcommitted
test: specify 'dir' for directory symlinks
Directory symlinks in Windows require the 'dir' flag to be passed to create the symlink correctly. PR-URL: #19049 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent eca333a commit fd27165

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

test/addons/symlinked-module/test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const addonPath = path.join(__dirname, 'build', common.buildType);
1919
const addonLink = path.join(tmpdir.path, 'addon');
2020

2121
try {
22-
fs.symlinkSync(addonPath, addonLink);
22+
fs.symlinkSync(addonPath, addonLink, 'dir');
2323
} catch (err) {
2424
if (err.code !== 'EPERM') throw err;
2525
common.skip('module identity test (no privs for symlinks)');

test/es-module/test-esm-symlink.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ try {
3737
fs.symlinkSync(real, link_absolute_path);
3838
fs.symlinkSync(path.basename(real), link_relative_path);
3939
fs.symlinkSync(real, link_ignore_extension);
40-
fs.symlinkSync(path.dirname(real), link_directory);
40+
fs.symlinkSync(path.dirname(real), link_directory, 'dir');
4141
} catch (err) {
4242
if (err.code !== 'EPERM') throw err;
4343
common.skip('insufficient privileges for symlinks');

test/parallel/test-module-symlinked-peer-modules.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fs.mkdirSync(moduleB);
4343
// Attempt to make the symlink. If this fails due to lack of sufficient
4444
// permissions, the test will bail out and be skipped.
4545
try {
46-
fs.symlinkSync(moduleA, moduleA_link);
46+
fs.symlinkSync(moduleA, moduleA_link, 'dir');
4747
} catch (err) {
4848
if (err.code !== 'EPERM') throw err;
4949
common.skip('insufficient privileges for symlinks');

0 commit comments

Comments
 (0)