d12frosted / homebrew-emacs-plus

Emacs Plus formulae for the Homebrew package manager
MIT License
2.24k stars 175 forks source link

Update osascript command to set alias name to Emacs.app #673

Closed gsingh93 closed 3 months ago

gsingh93 commented 3 months ago

I'm not sure if the original behavior was intentional, but the osascript command in the post install message was creating a symlink called /Applications/Emacs instead of /Applications/Emacs.app, so I had to manually rename it after. I updated the command so it sets the alias name to Emacs.app.

(Disclaimer: I don't know AppleScript, I just asked ChatGPT)

d1egoaz commented 3 months ago

I tested it on my machine ✅

at 09:09:59 AM ❯ osascript -e 'tell application "Finder" to make alias file to posix file "/opt/homebrew/opt/emacs-plus@30/Emacs.app" at POSIX file "/Applications"  with properties {name:"Emacs.app"}'
alias file Emacs.app of folder Applications of startup disk