Skip to content

Add selfinstall --skip-env to avoid shell/profile mutation - #346

Merged
agocke merged 2 commits into
mainfrom
copilot/add-skip-env-flag
Jul 3, 2026
Merged

Add selfinstall --skip-env to avoid shell/profile mutation#346
agocke merged 2 commits into
mainfrom
copilot/add-skip-env-flag

Conversation

Copilot AI commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

dnvm selfinstall always updated the user environment, which made non-interactive bootstrap flows noisy and undesirable in CI. This change adds an explicit opt-out so callers can install the dnvm binary without modifying shell profiles or persistent user environment variables.

  • CLI surface

    • Adds --skip-env to dnvm selfinstall.
    • Exposes the flag in command help alongside --skip-tracking.
  • Self-install behavior

    • Threads the new option through SelfInstallCommand.
    • Suppresses the "update user environment" prompt when --skip-env is set.
    • Skips the UpdateEnv(...) path entirely, avoiding:
      • Unix shell profile edits and $DNVM_HOME/env generation
      • Windows persistent user PATH / DOTNET_ROOT updates
  • Usage

    • Supports side-effect-free bootstrap when combined with existing tracking opt-outs:
curl --proto '=https' -sSf https://dnvm.net/install.sh | sh -s -- -y --skip-tracking --skip-env
  • Coverage
    • Updates selfinstall help expectations.
    • Adds focused coverage for the Unix --skip-env path to ensure profile/env files are left untouched.

Copilot AI changed the title [WIP] Add flag to selfinstall to skip modifying shell profiles and user env Add selfinstall --skip-env to avoid shell/profile mutation Jul 3, 2026
Copilot finished work on behalf of agocke July 3, 2026 02:08
Copilot AI requested a review from agocke July 3, 2026 02:08
@agocke
agocke marked this pull request as ready for review July 3, 2026 16:57
@agocke
agocke merged commit 92c2f9a into main Jul 3, 2026
3 checks passed
@agocke
agocke deleted the copilot/add-skip-env-flag branch July 3, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add flag to selfinstall to skip modifying shell profiles / user env (--skip-env)

2 participants