1 file changed
+6
-1
crates/cli/src/cloud-deploy/process_deploy_nextjs_ssr.rs
+6
-1
@@ -220,7 +220,12 @@ pub async fn process_deploy_nextjs_ssr(env: Environment, config: Config) -> Resu
220
// With stdio captured pnpm has no TTY, so when it needs to recreate
221
// node_modules (store or linker change) it aborts with
222
// ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY instead of prompting.
223
- if package_manager == "pnpm" {
223
+ // CI=true would also skip the prompt, but it turns on --frozen-lockfile.
224
+ // Matching on the file stem also catches full paths and Windows `pnpm.cmd`.
225
+ let is_pnpm = std::path::Path::new(package_manager)
226
+ .file_stem()
227
+ .is_some_and(|stem| stem.eq_ignore_ascii_case("pnpm"));
228
+ if is_pnpm {
229
install_command.arg("--config.confirm-modules-purge=false");
230
}
231
let install_output = install_command.current_dir(source).output().map_err(|e| {