Good Day,
I am trying to run a build file to remove files in sublime text 2. Like this:
"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"]
}
]
}
All works great, however upon clean, it says
[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]
Even if i changed rm to some rubbish like lol. it gives the same error. I dont get it
Basic commands like rm
and ls
are usually located in /bin
or /usr/bin
. You need to add these paths to the "path" variable so Sublime Text 2 can find them.
"path": "/usr/local/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/Raaj/sat/bin:/bin:/usr/bin",
If you need to locate where a program lives, use the which
command:
$ which telnet
/usr/bin/telnet