Skip to content

Support non-interactive installation for CI/devcontainers (e.g., GitHub Codespaces) #1079

@fengmk2

Description

@fengmk2

Summary

The install script (curl -fsSL https://vite.plus | bash) prompts for user input when run as a postCreateCommand in GitHub Codespaces devcontainers, causing the setup to hang indefinitely.

Reproduction

Create a .devcontainer/devcontainer.json:

{
  "name": "Vite+",
  "image": "mcr.microsoft.com/devcontainers/typescript-node:4-24-trixie",
  "postCreateCommand": "curl -fsSL https://vite.plus | bash"
}

Open in GitHub Codespaces. The container creation loops forever because the installer prompts "Would you want Vite+ to manage Node.js versions?" but there's no way to provide input.

Root Cause

In install.sh:473, the interactive check [ -e /dev/tty ] && [ -t 1 ] passes in Codespaces because /dev/tty exists and stdout is attached to a pseudo-terminal during postCreateCommand.

Suggested Fix

Add an environment variable (e.g., VITE_PLUS_NODE_MANAGER=yes|no) to skip the interactive prompt, allowing fully non-interactive installs:

curl -fsSL https://vite.plus | VITE_PLUS_NODE_MANAGER=yes bash

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Priority

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions