From 5fec1fc00c07e47f939712906d48df49394afc64 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 1 Nov 2016 14:02:55 +0000 Subject: [PATCH] Fix file protocol referencing local tarball - fixes #639 (#1591) --- src/resolvers/exotics/tarball-resolver.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/resolvers/exotics/tarball-resolver.js b/src/resolvers/exotics/tarball-resolver.js index f508a813b2..5769540407 100644 --- a/src/resolvers/exotics/tarball-resolver.js +++ b/src/resolvers/exotics/tarball-resolver.js @@ -5,6 +5,7 @@ import type PackageRequest from '../../package-request.js'; import TarballFetcher from '../../fetchers/tarball-fetcher.js'; import ExoticResolver from './exotic-resolver.js'; import Git from './git-resolver.js'; +import {removeSuffix} from '../../util/misc.js'; import * as versionUtil from '../../util/version.js'; import * as crypto from '../../util/crypto.js'; import * as fs from '../../util/fs.js'; @@ -50,7 +51,7 @@ export default class TarballResolver extends ExoticResolver { return shrunk; } - const {url} = this; + const url = removeSuffix(this.url, 'file:'); let {hash, registry} = this; let pkgJson;