Skip to content

Commit e415d43

Browse files
committed
feat(installer): auto-detect CI environment to skip interactive prompts
1 parent 19c3e24 commit e415d43

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • crates/vite_installer/src

crates/vite_installer/src/cli.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ pub fn parse() -> Options {
5454
if opts.registry.is_none() {
5555
opts.registry = std::env::var("NPM_CONFIG_REGISTRY").ok();
5656
}
57-
// quiet implies yes
58-
if opts.quiet {
57+
// CI and quiet both imply non-interactive (no prompts)
58+
if opts.quiet || std::env::var_os("CI").is_some() {
5959
opts.yes = true;
6060
}
6161

0 commit comments

Comments
 (0)