From 50ee729ea2cc6115f144583443d6df95b0e2967b Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Wed, 28 Mar 2018 17:58:56 +0200 Subject: [PATCH] Allow to disable shorthand resolver (#2507) --- lib/core/resolverFactory.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/core/resolverFactory.js b/lib/core/resolverFactory.js index 9de177705..f015fb485 100644 --- a/lib/core/resolverFactory.js +++ b/lib/core/resolverFactory.js @@ -176,6 +176,12 @@ function getConstructor(decEndpoint, options, registryClient) { // Check if is a shorthand and expand it addResolver(function () { + + // Check if the shorthandResolver is falsy + if (!config.shorthandResolver) { + return; + } + // Skip ssh and/or URL with auth if (/[:@]/.test(source)) { return;