Laravel Valet: “sorry, you are not allowed to preserve the environment”

So I ran a simple composer global update command this afternoon — you won’t believe what happened then! 😱


I tried to start Laravel Valet as usual:

$ valet start

…but suddenly got this error message, which I haven’t seen before:

sudo: sorry, you are not allowed to preserve the environment

The solution turned out to be this:

$ sudo valet trust

After that, valet start ran as expected 👌🏻 Hope this was helpful 🤗