UPDATE 7/15/2019 – Please see my updated post on this. Slack has provided a plist-based method, finally!
If you deploy Slack with anything that isn’t VPP, you’ve probably run across the annoying instance where Slack will constantly prompt your users for admin credentials to update itself. This is all well and good if the user has admin rights, but if not, they’re stuck hitting cancel until you push a new version. Awful.
Some time ago a GitHub issue was opened for the update framework (Squirrel) and a long discussion was had about how MacAdmins were holding it wrong. That was updated today and this functionality has been added, albeit in a strange and poorly documented way.
The key is to set an environmental variable called SLACK_NO_AUTO_UPDATES, which the update mechanism will see and therefore skip the updates. The code in question:
Here’s how to enable this in your environment. Note, I strongly recommend you only do this if you’ll be tightly managing updates using a management toolset such as Munki, Jamf, or similar. Slack is essentially a web browser, and you want to make sure it has the latest updates as security problems pop up.
Take this gist, and save it into /Library/LaunchAgents as an appropriately named plist.
Load it and restart Slack, and you’re good to go. Note that any open apps (or apps that are re-opened after a reboot) will not see this, so you’ll need to ensure that Slack is fully quit and reopened somehow. You can test this by doing “env | grep SLACK_NO_AUTO_UPDATES” in your terminal – you should see the variable set.
edit: thank you Greg Neagle for pointing out that launchd doesn’t accept spaces in between commands. A previous version of the plist gist contained spaces, and while it worked, it’s not the most compatible solution.
[…] also to Rick Heil for the idea of putting this into a Launch […]
We’re using Munki and would love to push that disable-Auto-updates via munki. Would you mind sharing how you would perform this the right way? Push a pkg with the plist file with a install script to set the variable?
Any help on how to deploy this fix properly via munki is appreciated.
I am struggling with this in our environment. No devices will accept the “SLACK_NO_AUTO_UPDATES” variable. No matter how it is applied (launchagent, script, command line), it never makes it into the user env. Thoughts?
Same here. No environment variable set after loading the plist.
I have the same problem as Tobias. I am getting the same problem where this doe not work
For those having issues, try checking with this command:
launchctl getenv SLACK_NO_AUTO_UPDATES
This solved our issues for a month or so – until Slack released it’s most recent update. Even after ensuring that the most recent version of Slack is on the computer we are still seeing the popup. Any suggestions?
Grace – we also saw this issue, and tracked it down to the fact that Slack is still downloading and caching an updater even though it is turned off. I’ll have a post soon about the way Slack is allowing us better update control in v4.x.