无法在sublime text 2中运行rm命令

时间:2013-08-25 21:58:16

标签: sublimetext2 rm

美好的一天,

我正在尝试运行构建文件来删除崇高文本中的文件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这样的垃圾。它给出了同样的错误。我不明白

1 个答案:

答案 0 :(得分:0)

rmls等基本命令通常位于/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