美好的一天,
我正在尝试运行构建文件来删除崇高文本中的文件2.像这样:
"cmd": ["make","all"],
"working_dir": "${file_path}",
"selector": "source.makefile",
"path": "/usr/local/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/Raaj/sat/bin",
"variants":
[
{
"name": "Clean",
"cmd": ["rm", "-f","demo.hex","demo.elf"]
},
{
"name": "All",
"cmd": ["make", "all"]
}
]
}
一切都很好,但是在干净的时候,它说
[Errno 2] No such file or directory
[cmd: [u'rm', u'-f', u'demo.hex', u'demo.elf']]
[dir: /Users/Raaj/Documents/STM32F4/Project/IO_Toggle]
[path: /usr/local/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/Raaj/sat/bin]
[Finished]
即使我把rm变成了像lol这样的垃圾。它给出了同样的错误。我不明白
答案 0 :(得分:0)
rm
和ls
等基本命令通常位于/bin
或/usr/bin
。您需要将这些路径添加到“path”变量中,以便Sublime Text 2可以找到它们。
"path": "/usr/local/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/Raaj/sat/bin:/bin:/usr/bin",
如果您需要找到程序所在的位置,请使用which
命令:
$ which telnet
/usr/bin/telnet