Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting ZSH_DISABLE_COMPFIX=true in .zshrc doesn't work

I need to disable the zsh's COMPFIX process to suppress the following warning I see every time I open a terminal window:

zsh compinit: insecure directories and files, run compaudit for list.

The cause of the warning is not the issue here; I have two admin users on the same Macbook who both need to use homebrew. When files in /usr/local have group read/write privileges rather than single user privileges, the COMPFIX process flags them as insecure.

Other solutions suggest adding ZSH_DISABLE_COMPFIX=true to the top of my .zshrc file. I have done this and I still see the error. There are multiple .zshrc-like files in my home directory, including .zshrc.pre-oh-my-zsh and .zshrc~, and have tried adding ZSH_DISABLE_COMPFIX=true to each of these too, without success.

How can I successfully turn off this warning?

like image 940
jonsanders101 Avatar asked Jan 06 '19 12:01

jonsanders101


2 Answers

Try to add it at the beginning of the .zshrc file, before sourcing oh-my-zsh

and put it in quotes like: ZSH_DISABLE_COMPFIX="true"

like image 154
E.FU Avatar answered Oct 01 '22 08:10

E.FU


You likley just need to place true in quotes like so: ZSH_DISABLE_COMPFIX="true"

Then reload your zsh settings with source ~/.zshrc

like image 36
cjmaria Avatar answered Oct 01 '22 08:10

cjmaria