denoland / deno_install

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

Request for Non-interactive Mode in Deno Installation Script #297

Closed iugo closed 2 weeks ago

iugo commented 3 weeks ago

Hello Deno team,

I hope this message finds you well. I'm writing to request a new feature for the Deno installation script: a non-interactive mode.

Current Situation: The recent addition of interactive prompts in the installation process, while helpful for many users, has inadvertently broken our automated installation workflows. Specifically, the prompt asking to edit shell configs to add Deno to the PATH requires manual intervention, which is not feasible in our automated environments.

Request: We kindly request the addition of a non-interactive mode for the Deno installation script. This mode would:

  1. Automatically accept default options or use predefined settings.
  2. Skip any prompts that require user input.
  3. Allow for silent installation in automated environments.

Proposed Implementation: This could be implemented as a command-line flag (e.g., --non-interactive or -y) or an environment variable (e.g., DENO_NONINTERACTIVE=1).

Benefits:

  1. Maintains compatibility with existing automated installation processes.
  2. Facilitates easier integration in CI/CD pipelines and containerized environments.
  3. Allows for seamless updates in managed environments.

We appreciate your consideration of this feature request. It would greatly enhance the flexibility of Deno's installation process, especially for users who rely on automated workflows.

Thank you for your time and continued work on Deno.

Best regards, iugo

bartlomieju commented 3 weeks ago

Thanks, we'll look into this asap. And sorry for the inconvenience!

nathanwhit commented 3 weeks ago

Hello @iugo! Again, sorry for the trouble!

I think your suggestion makes a lot of sense, and I've started working on it.


In the meantime, I've updated the script to disable prompts if the CI environment var is set.

For now, you can set that variable to disable prompts until we have a more intuitive solution (such as a -y flag, as you suggest)

nathanwhit commented 2 weeks ago

This should now be available! You can pass the -y (--yes) flag to the installer to accept defaults and skip the prompts. If you would prefer to not have us set up the PATH, you can pass --no-modify-path in addition.