Pana / nrm

NPM registry manager, fast switch between different registries: npm, cnpm, nj, taobao

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nrm ls * hidden

soyof opened this issue · comments

commented

cli.js

    getCurrentRegistry(function (cur) {
        var info = [''];
        var allRegistries = getAllRegistry();
        const keys = Object.keys(allRegistries);
        const len = Math.max(...keys.map(key => key.length)) + 3;
		

        Object.keys(allRegistries).forEach(function (key) {
            var item = allRegistries[key];
            //  bug    item[FIELD_IS_CURRENT]  ---> undefined
            var prefix = item[FIELD_IS_CURRENT] && equalsIgnoreCase(item.registry, cur) ? '* ' : '  ';   //  '   '

            info.push(prefix + key + line(key, len) + item.registry);
        });

        info.push('');
        printMsg(info);
    });
}
commented

me too

the same question.

Same issue. Use npm config ls could see that registry switched successfully, but nrm does not show the *

M1 Mac, Zsh

image

nrm的 cli.js 的141行 &&换成||就好了