-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
module: skip preserveSymlinks for main
PR-URL: #19388 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
- Loading branch information
1 parent
2540581
commit 141be92
Showing
3 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
'use strict'; | ||
|
||
const common = require('../common'); | ||
const assert = require('assert'); | ||
const path = require('path'); | ||
const { spawn } = require('child_process'); | ||
const tmpdir = require('../common/tmpdir'); | ||
const fs = require('fs'); | ||
tmpdir.refresh(); | ||
|
||
const realPath = path.resolve(__dirname, '../fixtures/es-modules/symlink.mjs'); | ||
const symlinkPath = path.resolve(tmpdir.path, 'symlink.js'); | ||
|
||
try { | ||
fs.symlinkSync(realPath, symlinkPath); | ||
} catch (err) { | ||
if (err.code !== 'EPERM') throw err; | ||
common.skip('insufficient privileges for symlinks'); | ||
} | ||
|
||
spawn(process.execPath, | ||
['--experimental-modules', '--preserve-symlinks', symlinkPath], | ||
{ stdio: 'inherit' }).on('exit', (code) => { | ||
assert.strictEqual(code, 0); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export var symlinked = true; |