diff --git a/workspaces/arborist/lib/consistent-resolve.js b/workspaces/arborist/lib/consistent-resolve.js index cbd3392a9300c..890caa32f1072 100644 --- a/workspaces/arborist/lib/consistent-resolve.js +++ b/workspaces/arborist/lib/consistent-resolve.js @@ -20,11 +20,10 @@ const consistentResolve = (resolved, fromPath, toPath, relPaths = false) => { raw, } = npa(resolved, fromPath) if (type === 'file' || type === 'directory') { - const cleanFetchSpec = fetchSpec if (relPaths && toPath) { - return `file:${relpath(toPath, cleanFetchSpec)}` + return `file:${relpath(toPath, fetchSpec)}` } - return `file:${cleanFetchSpec}` + return `file:${fetchSpec}` } if (hosted) { return `git+${hosted.auth ? hosted.https(hostedOpt) : hosted.sshurl(hostedOpt)}`