bash 是否有终端命令来更新 minimatch MAC OSX
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37998674/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is there a Terminal command to update minimatch MAC OSX
提问by NepdeBrio
Can anyone suggest the proper command to write on Terminal window in OSX to update minimatch script. I tried the following:
任何人都可以建议在 OSX 的终端窗口上编写正确的命令来更新 minimatch 脚本。我尝试了以下方法:
$ sudo npm update -g minimatch
It looks like commands got executed with no result messages . Then later checked with the command:
看起来命令执行时没有结果消息。然后后来用命令检查:
$ sudo minimatch --version
it else end in a error:
否则以错误结束:
-bash: minimatch: command not found
I don't know exactly , but i feel something is wrong. Could anyone tell me if anything wrong made in above 2 syntax.
我不知道确切,但我觉得有些不对劲。谁能告诉我上述 2 种语法是否有任何错误。
I tried a lot searching for articles , but not a one specific to my problem . Thanks ahead for your advice to find a fix for my problem
我尝试了很多搜索文章,但不是针对我的问题的文章。提前感谢您的建议,以解决我的问题
Thanks!
谢谢!
回答by Bo Shi
I tried this, it will update minimatch at the same time:
我试过了,它会同时更新 minimatch:
$ npm install npm -g
回答by akkolad
$ sudo npm install -g minimatch
worked for me !
对我来说有效!