Here’s a viable solution
Using PackageControl, or manually, install the ProjectEnvironment package.
using settings like the following, make sure your environment file, env_file
, is set for your operating system. Also make sure you’ve set your PATH variable.
// Settings in here override those in "/ProjectEnvironment/ProjectEnvironment.sublime-settings",
{
// If true some debugging information will be preinted on console
"print_output": false,
// If true some variables available in Sublime's API, will be exposed as
// standard environment variables.
// these are:
// "project_path", "project", "project_name", "project_base_name", "packages"
"set_sublime_variables": false,
// It may be useful to add a prefix to those variables so that they don't confict with yours
"sublime_variables_prefix": "",
// those variables can be all capitalised if you wish. "project" will become "PROJECT"
"sublime_variables_capitalized": false,
// files with this extensions will be run through source_vars(.bat|.sh)
// DON'T FORGET THE DOT!
"command_line_to_wrap_extensions": [
".bat",
".sh"
],
// This is only for windows, since Mac and Linux can use shebang:
"execute_ext_with": {
".py": "python",
".zsh": "zsh",
".sh": "zsh",
".bash": "bash"
},
"settings": {
"project_environment": {
"env": {},
"env_file": "",
"windows": {},
"osx": {
"PATH": "$PATH:/usr/local/bin",
"env_file": "~/.zshenv"
},
"linux": {}
}
}
}
Can’t say I understand why, but I couldn’t get it to work without setting both