Sublime Forum

Build system command not found in Linux

#1

I wrote a package for NCL (NCAR Command Language), which has the NCL.sublime-build:

{ "selector": "source.ncl", "shell_cmd": "cd ${file_path}; ncl ${file}" }
In Mac OS X, there is no problem. I can run a script by pressing ‘cmd-b’. But in Linux, I press ‘ctrl-b’ and encounter:

/bin/bash: ncl: command not found [Finished in 0.0s with exit code 127] [shell_cmd: cd /home/dongli; ncl /home/dongli/test.ncl] [dir: /home/dongli] [path: /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games]
Obviously, the PATH is not correct. So I would like to know which BASH configuration file does ST read? The settings for NCL is in .bashrc.

Thanks for help!

UPDATE:

I tried to type subl in terminal to open ST, and the ncl command is correctly invoked. But I would like ST can read .bashrc when opened by clicking the icon.

0 Likes

#2

System: Linux 3.2.0-60-generic #91-Ubuntu SMP Wed Feb 19 03:54:44 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

The command line start using ‘subl’ followed by sourcing with -b is fine for a linux user, I expect. I particularly like that you can have code from two different directories and can source them both without having to reset the directories.

0 Likes