From 9576de200e4e6f92aea28d3501af244f383ece2e Mon Sep 17 00:00:00 2001 From: KuangPF <1633397286@qq.com> Date: Mon, 3 Jun 2019 15:42:29 +0800 Subject: [PATCH] fix: set useTaobaoRegistry to true when user configured custom registry is taobao registry --- packages/@vue/cli/lib/util/shouldUseTaobao.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/@vue/cli/lib/util/shouldUseTaobao.js b/packages/@vue/cli/lib/util/shouldUseTaobao.js index 8384ad00d6..da842663bf 100644 --- a/packages/@vue/cli/lib/util/shouldUseTaobao.js +++ b/packages/@vue/cli/lib/util/shouldUseTaobao.js @@ -40,6 +40,11 @@ module.exports = async function shouldUseTaobao (command) { const userCurrent = (await execa(command, ['config', 'get', 'registry'])).stdout const defaultRegistry = registries[command] + const taobaoRegistry = registries.taobao + + if (removeSlash(userCurrent) === removeSlash(taobaoRegistry)) { + return save(true) + } if (removeSlash(userCurrent) !== removeSlash(defaultRegistry)) { // user has configured custom registry, respect that