激活时执行脚本, permission denied
shell
➜ scripts ./install.sh
./install.sh: line 31: /Users/dry/Library/LaunchAgents/jetbrains.vmoptions.plist: Permission denied
jetbrains.vmoptions.plist 这个文件没权限,打开看了一下 install.sh 这个脚本里写的,要访问这个文件,但是没有权限。
解决办法是,先给授权:
shell
➜ scripts sudo chmod 777 /Users/dry/Library/LaunchAgents/jetbrains.vmoptions.plist
哪个文件报无权限就给哪个文件授权,之后再执行脚本即可,最后成功如下:
shell
➜ scripts ./install.sh
./install.sh: line 43: /Users/dry/.jetbrains.vmoptions.sh: Permission denied
➜ scripts sudo chmod 777 /Users/dry/.jetbrains.vmoptions.sh
➜ scripts ./install.sh
done. the "kill Dock" command can fix the crash issue.
会提示 done. the "kill Dock" command can fix the crash issue.