Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions crates/vite_task/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,20 @@ pub async fn main<
>,
>,
) -> Result<std::process::ExitStatus, Error> {
let result = tokio::process::Command::new("pnpm")
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found a strange issue: running ./target/debug/vt add foo -w directly succeeds, but running it through napi causes problems. It will freeze here.

VITE_LOG=trace ./packages/cli/bin/vite add foo -w                                        node(v22.21.0) 
2025-10-22T05:47:18.191108Z TRACE mio::poll: registering event source with poller: token=Token(1), interests=READABLE

@Brooooooklyn @branchseer

.args(std::env::args_os().skip(1))
// .envs(envs)
.stdin(std::process::Stdio::inherit())
.stdout(std::process::Stdio::inherit())
.stderr(std::process::Stdio::inherit())
// .output()
// .spawn()?
// .wait()
.status()
.await?;
println!("pnpm exit status: {:?}", result);
return Ok(result);

// Auto-install dependencies if needed, but skip for install command itself, or if `VITE_DISABLE_AUTO_INSTALL=1` is set.
if !matches!(args.commands, Commands::Install { .. })
&& std::env::var_os("VITE_DISABLE_AUTO_INSTALL") != Some("1".into())
Expand Down
Loading