Skip to content

install.sh: skip sudo prompt and fall through to ~/.local/bin by default #25

@youshibin

Description

@youshibin

Problem

When /usr/local/bin is not writable, the install script prompts for sudo mid-pipe, which is jarring when running via:

curl -fsSL https://jitsudo.dev/install.sh | sh

The script already falls through to $HOME/.local/bin if sudo fails, but the user has to either enter their password or interrupt the script to get there.

Proposed solution

  • Skip the sudo attempt by default and go straight to $HOME/.local/bin when the preferred install dir is not writable
  • Alternatively, add a --sudo opt-in flag for users who explicitly want system-wide installation

The existing INSTALL_PREFIX workaround (INSTALL_PREFIX=$HOME curl ... | sh) handles this for now, but it's not discoverable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions