summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2022-01-15 17:43:24 +0000
committerGrégoire Duchêne <gduchene@awhk.org>2022-01-15 17:43:24 +0000
commitf7072abe15016183fe59c53d788fdac310f03969 (patch)
tree89b3c677da5af87429c378c2093ffafb2328886e
parent240973f98e87431a5678188f653224013b9501a8 (diff)
darwin/env.sh: Set LSEnvironment using JSON
-rwxr-xr-xdotfiles-darwin/bin/env.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/dotfiles-darwin/bin/env.sh b/dotfiles-darwin/bin/env.sh
index 7a9d7e5..d291ef9 100755
--- a/dotfiles-darwin/bin/env.sh
+++ b/dotfiles-darwin/bin/env.sh
@@ -9,7 +9,6 @@ done
# make it work in Emacs only. Yep, it’s pretty bad.
local plist=~/Applications/Emacs.app/Contents/Info.plist
if [[ -f ${plist} ]]; then
- plutil -replace LSEnvironment -dictionary ${plist}
- plutil -insert LSEnvironment.PATH -string "${PATH}" ${plist}
+ plutil -replace LSEnvironment -json '{"PATH": "'${PATH}'"}' ${plist}
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f ${plist:h:h}
fi