From 8a12e9994f047888ce25e0cc196e5da7f7c3dcae Mon Sep 17 00:00:00 2001 From: Daijiro Wachi Date: Tue, 13 Oct 2020 15:52:46 +0900 Subject: [PATCH] bootstrap: use file URL instead of relative url MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/35622 Fixes: https://github.com/nodejs/node/issues/35621 Reviewed-By: Gerhard Stöbich Reviewed-By: Rich Trott Reviewed-By: Richard Lau --- lib/internal/bootstrap/pre_execution.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js index e9700fc1f4639d..73aa3dfb3c559d 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js @@ -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 += '/';