Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复nrm ls不显示星号问题,顺便修复nrm current不显示问题 #110

Closed
wants to merge 1 commit into from
Closed

Conversation

xiaoyu-666
Copy link

初次下载nrm使用nrm ls打印地址列表是不显示星号的,
使用nrm use taobao时,文件.nrmrc是空的,所以以下判断是不成立的

if (hasOwnProperty(customRegistries, name) && (name in registries || customRegistries[name].registry === registry.registry)) {
                    registry[FIELD_IS_CURRENT] = true;
                    customRegistries[name] = registry;
}

所以我删除了判断条件,保留了以下内容

  registry[FIELD_IS_CURRENT] = true;
  customRegistries[name] = registry;

直接写入文件即可,亲测显示正常

@CaptainOfPhB
Copy link
Contributor

duplicated with #108

@xiaoyu-666
Copy link
Author

duplicated with #108
既然已经解决了,那我关闭提交了

@xiaoyu-666 xiaoyu-666 closed this Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants