defaults write '$1/Contents/info.plist' MyVariable false
For some reason, I cannot get this to work, and I've tried everything I can think of. Even through an AppleScript, instead of a shell script, with the same results.
I can have it output the command first, then copy that output, and paste it in Terminal, and it works fine. The syntax is 100% what I want. It just will NOT work in Automator. I even tried using sudo, and admin withe the AppleScript attempts, but that's not the problem.
I can output to a text file, and just like using the clipboard to paste, the syntax is correct, and functions as expected.
My goal is to be able to drag and drop an application on an Automator app, and have it add my variable to the info.plist in the application bundle.
Why would it work in Terminal, but not in Automator?
output:
defaults write '~/Desktop/MyApp.app/Contents/info.plist' MyVar false