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 <riclau@uk.ibm.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent eca333a commit fd27165

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎test/addons/symlinked-module/test.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const addonPath = path.join(__dirname, 'build', common.buildType);
1919
constaddonLink=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')throwerr;
2525
common.skip('module identity test (no privs for symlinks)');

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

Lines changed: 1 addition & 1 deletion
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')throwerr;
4343
common.skip('insufficient privileges for symlinks');

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

Lines changed: 1 addition & 1 deletion
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')throwerr;
4949
common.skip('insufficient privileges for symlinks');

0 commit comments

Comments
 (0)