bootstrap: use file URL instead of relative url

PR-URL: https://github.com/nodejs/node/pull/35622
Fixes: https://github.com/nodejs/node/issues/35621
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
This commit is contained in:
Daijiro Wachi authored and Node.js GitHub Bot committed 2020-10-13 13:23:26 +00:00
1 parent 9f2e19fa30
commit 8a12e9994f
1 file changed
+1 -1
+1 -1
View File
@@ -362,7 +362,7 @@ function initializePolicy() {
// no bare specifiers for now
let manifestURL;
if (require('path').isAbsolute(experimentalPolicy)) {
manifestURL = new URL(experimentalPolicy, 'file://');
manifestURL = new URL(`file://${experimentalPolicy}`);
} else {
const cwdURL = pathToFileURL(process.cwd());
cwdURL.pathname += '/';