[英]How does the Atom Package Manager (apm) know a package is for Atom?
[英]the apm(the package manager of atom) start shell run error
我正在處理osx 10.11系統中apm的錯誤。 當我跑步
apm
在我的命令行中,由於文件路徑錯誤而引發錯誤:
/usr/local/bin/apm: line 32: /Applications/Atom.app/Contents/Resources/app/apm/node_modules/.bin/node: No such file or directory
簽出后,我發現:在apm shell(/Atom.app/Contents/Resources/app/apm/node_modules/.bin/apm)中,有一個while循環:
while [ -L "$binDir" ]
do
binDir=`readlink "$binDir"`
builtin cd "`dirname "$binDir"`"
binDir=`basename "$binDir"`
done
似乎此循環僅在我的osx系統上運行一次,而在其他osx系統上運行兩次,因此出現的錯誤就是因為這個原因。
-L
檢查文件是否是符號鏈接,如果是,則返回True。 通過man test
:
-L FILE
FILE exists and is a symbolic link (same as -h)
查看一個示例,其中我們創建一個文件hello
和一個名為my_link
的(軟)鏈接:
$ touch hello
$ ln -s hello my_link
$ [ -L "hello" ] && echo "this is a link" || echo "this is NOT a link"
this is NOT a link
$ [ -L "my_link" ] && echo "this is a link" || echo "this is NOT a link"
this is a link
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.