From 3a175a6eb55629bf1cc2069552252818fbd038e3 Mon Sep 17 00:00:00 2001 From: Ben Holloway Date: Mon, 9 Oct 2017 16:08:12 +1100 Subject: [PATCH] exclude explicit http(s) URIs as we already do for data URIs --- lib/find-file.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/find-file.js b/lib/find-file.js index 687b51d..84b2a07 100644 --- a/lib/find-file.js +++ b/lib/find-file.js @@ -46,8 +46,8 @@ function findFile(opt) { // ensure we have some limit to the search limit = limit && path.resolve(limit) || process.cwd(); - // ignore data uris and ensure we are at a valid start path - var absoluteStart = !(/^data\:/.test(uri)) && path.resolve(startPath); + // ignore explicit uris data|http|https and ensure we are at a valid start path + var absoluteStart = !(/^(data|https?):/.test(uri)) && path.resolve(startPath); if (absoluteStart) { // find path to the root, stopping at cwd, package.json or bower.json