Running valet install asks for my sudo password and then immediately exits with exit status 0 (success), but doesn't actually do anything.
I tracked it down to the way you pass the $HOME var through when proxying the call with sudo. I figured out that sudo env .... is just exiting immediately and then the exit 0 afterward falsely reports success. I think a better approach would be the following:
sudo -E $SOURCE "$@"
exit $?
-E tells sudo to preserve the environment (namely $HOME)
I tried this approach and it works.
Running
valet installasks for my sudo password and then immediately exits with exit status 0 (success), but doesn't actually do anything.I tracked it down to the way you pass the
$HOMEvar through when proxying the call with sudo. I figured out thatsudo env ....is just exiting immediately and then theexit 0afterward falsely reports success. I think a better approach would be the following:-E tells sudo to preserve the environment (namely
$HOME)I tried this approach and it works.