@@ -109,8 +109,11 @@ pub async fn generate_wrapper_package_json(
109109
110110/// Install production dependencies using the new version's binary.
111111///
112- /// Spawns: `{version_dir}/bin/vp install --silent` with `CI=true`.
113- pub async fn install_production_deps ( version_dir : & AbsolutePath ) -> Result < ( ) , Error > {
112+ /// Spawns: `{version_dir}/bin/vp install --silent [--registry <url>]` with `CI=true`.
113+ pub async fn install_production_deps (
114+ version_dir : & AbsolutePath ,
115+ registry : Option < & str > ,
116+ ) -> Result < ( ) , Error > {
114117 let vp_binary = version_dir. join ( "bin" ) . join ( if cfg ! ( windows) { "vp.exe" } else { "vp" } ) ;
115118
116119 if !tokio:: fs:: try_exists ( & vp_binary) . await . unwrap_or ( false ) {
@@ -121,8 +124,14 @@ pub async fn install_production_deps(version_dir: &AbsolutePath) -> Result<(), E
121124
122125 tracing:: debug!( "Running vp install in {}" , version_dir. as_path( ) . display( ) ) ;
123126
127+ let mut args = vec ! [ "install" , "--silent" ] ;
128+ if let Some ( registry_url) = registry {
129+ args. push ( "--registry" ) ;
130+ args. push ( registry_url) ;
131+ }
132+
124133 let output = tokio:: process:: Command :: new ( vp_binary. as_path ( ) )
125- . args ( [ "install" , "--silent" ] )
134+ . args ( & args )
126135 . current_dir ( version_dir)
127136 . env ( "CI" , "true" )
128137 . output ( )
0 commit comments