-
-
Save Pageboy/ba75a214268ed18ec1839d57c1c10364 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment