Closed uwang closed 2 years ago
我这边是正常的,确认一下环境和复现步骤。
我这边也有这个问题,我去看了下showCurrent
方法,这个if判断没有进去,&&符右边的逻辑不成立,下面有我打印出来的日志
function showCurrent(cmd) {
getCurrentRegistry(function(cur) {
var allRegistries = getAllRegistry();
var customRegistries = getCustomRegistry();
console.log("registry", cur);
console.log("customRegistries", customRegistries);
Object.keys(allRegistries).forEach(function(key) {
var item = allRegistries[key];
console.log("item", item);
if (equalsIgnoreCase(item.registry, cur) && (customRegistries[key] || item[FIELD_IS_CURRENT])) {
console.log("pass");
const showUrl = cmd[humps.camelize(FIELD_SHOW_URL)];
printMsg([showUrl ? item.registry : key]);
return;
}
});
});
}
我看了下npm的配置,registry配置成功了,只是nrm没有打印出来。
@uwang 那方便来一个pr吗?
MacOS 11.5.2