Skip to content

Instantly share code, notes, and snippets.

@alexkreidler
Created September 24, 2017 17:04
Show Gist options
  • Save alexkreidler/6fac2e1b6f6b303e428942a12827fabb to your computer and use it in GitHub Desktop.
Save alexkreidler/6fac2e1b6f6b303e428942a12827fabb to your computer and use it in GitHub Desktop.
#!/usr/bin/env sh
# Steps to fix Atom not updating properly on Mac OS, as described at
# https://discuss.atom.io/t/i-am-unable-to-update-to-the-latest-version-of-atom-on-macos-how-do-i-fix-this/40054
dirs=(/Applications/Atom.app/ ~/Library/Caches/com.github.atom.ShipIt ~/Library/Application\ Support/com.github.atom.ShipIt)
for dir in "${dirs[@]}"; do
echo "$dir"
if [ -d "$dir" ]; then
echo "Exists: $dir"
if [ ! $(stat -f "%Su" "$dir") == "$(whoami)" ]; then
echo "Bad permissions: $dir"
sudo chown -R $(whoami) "$dir"
fi
fi
done;
# Once done, open Atom, and start the update proccess. When Atom closes, wait a few (~5) mins for it to reopen.
# If it doesn't reopen, go back to troubleshooting!
@subimage
Copy link

This fixed my issue, thanks.

@quicoto
Copy link

quicoto commented Nov 16, 2017

Worked for me too. Thank you!

@BBaysinger
Copy link

I ran this script today. I got the output:

/Applications/Atom.app/

Exists: /Applications/Atom.app/
/Users/xxx/Library/Caches/com.github.atom.ShipIt
Exists: /Users/bradley/Library/Caches/com.github.atom.ShipIt
/Users/xxx/Library/Application Support/com.github.atom.ShipIt

It did not fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment