denoland / deno_install

Deno Binary Installer
https://deno.land/
MIT License
966 stars 179 forks source link

feat: Add flags to skip prompts and avoid modifying PATH #303

Closed nathanwhit closed 2 weeks ago

nathanwhit commented 2 weeks ago

Closes #297. Closes https://github.com/denoland/deno/issues/25931

Adds a flag to skip prompts and accept defaults, and a flag to disable modifying the PATH. This is essentially the same as what rustup has for its installer.

Options:
  -y, --yes
    Skip interactive prompts and accept defaults
  --no-modify-path
    Don't add deno to the PATH environment variable
  -h, --help
    Print help

Also adds a couple of integration tests for the installer, simulating a PTY to check how it would behave in an actual terminal.


The diff looks big, but the core of it is in install.sh and main.ts. The test file is mostly helper/boilerplate for the initial tests.