我正在处理我的OSX10.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系统上只运行了一次,在其他系统上运行了两次,我的错误就是因为这个。
发布于 2016-06-06 11:33:37
-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 linkhttps://stackoverflow.com/questions/37656091
复制相似问题