Pana / nrm

NPM registry manager, fast switch between different registries: npm, cnpm, nj, taobao
MIT License
2.77k stars 242 forks source link

nrm ls * hidden #130

Open soyof opened 2 years ago

soyof commented 2 years ago

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);
    });
}
868618 commented 2 years ago

me too

codepandy commented 1 year ago

the same question.

zhenya-zhu commented 1 year ago

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

M1 Mac, Zsh

image
win-96 commented 1 year ago

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