Sublime Forum

Shell_cmd stopped working


I have two commands defined like so:

        "caption": "Terminus: Open Julia Nightly",
        "command": "terminus_open",
        "args"   : {
            "cmd": ["C:/Users/PKrysl/AppData/Local/Programs/Julia/Julia-1.5.0-DEV/bin/julia.exe"],
            "cwd": "${file_path:${folder}}",
            "title": "Julia REPL",
            "pre_window_hooks": [
            	["focus_group", {"group": 1}]
            "env": {"JULIA_NUM_THREADS":"4"},
        "caption": "Terminus: Open Julia Alt",
        "command": "terminus_open",
        "args"   : {
            "shell_cmd": ["%LOCALAPPDATA%/Programs/Julia/Julia-1.5.0-DEV/bin/julia.exe"],
            "cwd": "${file_path:${folder}}",
            "title": "Julia REPL Alt",
            "pre_window_hooks": [
                ["focus_group", {"group": 1}]
            "env": {"JULIA_NUM_THREADS":"2"},       

Both used to work, but in the last few days the second, with shell_cmd, does not. And, yes, I checked

PKrysl@Marauder MINGW64 ~

I am on Windows 10 Version 1909. ST3 build 3211.
Any ideas? Your help will be appreciated.


How to set the path of an executable

Note that shell_cmd should be a string.



Curious. I’m pretty sure I haven’t changed this, and it used to work. Now, if I change it as you suggest to

"shell_cmd": "%LOCALAPPDATA%/Programs/Julia/Julia-1.5.0-DEV/bin/julia.exe",

I do get a tab where Julia should be running, but it doesn’t actually start.



Terminus has been upgraded to deal with some edge cases. Do you see any errors in the console?



No, there are no error messages anywhere.



I see what’s going on now, please try again with Terminus v0.3.9. (Package Control will take a while to fetch the udpate)



How do I know I have the right version?



If you use Package Control: List Packages from the command prompt, you can get a list of all of the packages that Package Control has installed; the entry in that list shows you what version is currently installed.



Got it. Thanks.



Nice. Upgrade to 0.3.9 works again. Many thanks!



Question for the technical support: When do the packages get updated? Automatically, or do I have some control over that? It seems Terminus was updated without me knowing about it.



Core Sublime packages (the ones that it ships with) only update when Sublime gets bumped to a new version; Package Control is responsible for upgrading packages that you asked it to install, and packages that you manually installed never get updated unless you do it yourself.

Primarily you’re probably concerned with Package Control updates here; by default it’s configured to automatically try to update packages every time Sublime starts, but only once per hour (so if you restart 5 times in a hour, it will only happen at most once).

The associated configuration for this is in the Package Control settings:

	// If packages should be automatically upgraded when ST starts
	"auto_upgrade": true,

	// If missing packages should be automatically installed when ST starts
	"install_missing": true,

	// If a package was installed by Package Control (has a
	// package-metadata.json file) but is not in installed_packages, remove it
	// based upon the assumption that it was removed on another machine and
	// the Package Control.sublime-settings file was synced to this machine.
	"remove_orphaned": true,

	// The minimum frequency in hours in which to check for automatic upgrades,
	// setting this to 0 will always check for automatic upgrades
	"auto_upgrade_frequency": 1,

	// Packages to not auto upgrade
	"auto_upgrade_ignore": [],

As seen in the comments, auto upgrading is turned on by default, but will only occur once per hour. The list of packages to ignore for upgrade purposes is empty so everything will upgrade whenever a check is made.

In addition, missing packages (packages which are in the installed_packages setting) which aren’t currently installed will be installed, and any orphaned packages (packages which are installed but no longer in the installed_packages setting) will be removed. These are the settings that allow you to synchronize your package control settings across machines and have it keep your list of packages up to date.

You can also manually upgrade a package that Package Control installed by using the Package Control: Upgrade Package command from the command palette. That will show you packages that have updates which haven’t been automatically updated yet (assuming you have that turned on). So for example if package updates happen while you’re running Sublime, you could use that to upgrade the package manually, or within the time limit you specified.

All of this only applies to packages that Package Control installed, which have a metadata file inside of them put there by package control at install time (it’s mentioned in the comments above). So you don’t have to worry about Package Control removing or updating packages that it didn’t install, though if you try to copy a sublime-package file that it installed from one machine to another without updating the appropriate settings, Package Control will notice the file and remove the package as an orphan.

There’s generally a delay of an hour or two between when a package author updates a package and Package Control is able to see it (due to a web crawler on the package control website having to notice that the package updated) so in this case as noted by Randy above, there was a delay between when the mentioned update happened and Package Control on your machine would first notice that it’s available for update.

There’s a bit of a demonstration/explanation of this in a video I made on Package Control as well.