Skip to content

valet install fails without any indication about what went wrong #455

@zacstewart

Description

@zacstewart

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions