Skip to content

Commit f1be296

Browse files
author
Maël Nison
committed
Fix offline resolution
1 parent 0b3c443 commit f1be296

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fetchers/tarball-fetcher.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export default class TarballFetcher extends BaseFetcher {
180180
async _fetch(): Promise<FetchedOverride> {
181181
const urlParse = url.parse(this.reference);
182182

183-
if (urlParse.protocol === null && urlParse.pathname.match(/^\.\.?[\/\\]/)) {
183+
if (urlParse.protocol === null && urlParse.pathname.match(/^(?=(?:\.{1,2}|[a-z]:)?[\\\/])/i)) {
184184
return await this.fetchFromLocal(this.reference);
185185
}
186186

0 commit comments

Comments
 (0)