@@ -932,8 +932,7 @@ pub(crate) async fn run_redirect_selected(
932932 socket_patch_core:: utils:: fs:: read_regular_to_string_sync ( path) . ok ( )
933933 } )
934934 } ;
935- let rewrite_options = || {
936- RewriteOptions {
935+ let rewrite_options = || RewriteOptions {
937936 dry_run : common. dry_run ,
938937 targets_pipenv_lock,
939938 pipenv_major,
@@ -945,7 +944,6 @@ pub(crate) async fn run_redirect_selected(
945944 npm_allow_remote_config : !common. no_npm_allow_remote_config ,
946945 npm_outer : & npm_outer,
947946 blocking : true ,
948- }
949947 } ;
950948 // The rollout gate plans again without its deferred rows: keep what
951949 // the second pass needs.
@@ -2306,19 +2304,13 @@ fn join_names(names: &[String], max: usize) -> String {
23062304/// artifacts, then verify with `vex`. After a vendored→hosted takeover
23072305/// (`vendored_removed`) the commit also has to carry the deleted vendored
23082306/// ledger entries and artifacts.
2309- fn format_next_steps (
2310- files : & [ String ] ,
2311- edits : & [ socket_patch_core:: patch:: redirect:: FileEdit ] ,
2312- vendored_removed : bool ,
2313- ) -> Vec < String > {
2307+ fn format_next_steps ( files : & [ String ] , edits : & [ socket_patch_core:: patch:: redirect:: FileEdit ] , vendored_removed : bool ) -> Vec < String > {
23142308 if files. is_empty ( ) && !vendored_removed {
23152309 return Vec :: new ( ) ;
23162310 }
23172311 let mut commit: Vec < String > = Vec :: new ( ) ;
23182312 if vendored_removed {
2319- commit. push (
2320- ".socket/vendor/ (the removed vendored ledger entries and artifacts)" . to_string ( ) ,
2321- ) ;
2313+ commit. push ( ".socket/vendor/ (the removed vendored ledger entries and artifacts)" . to_string ( ) ) ;
23222314 }
23232315 commit. extend ( files. iter ( ) . cloned ( ) ) ;
23242316 let npm = files
@@ -4399,43 +4391,19 @@ mod tests {
43994391 use super :: npm_allow_remote_one_line;
44004392 let hosts = [ "patch.socket.dev" ] ;
44014393 let cases = [
4402- (
4403- npm_allow_remote_configured_detail ( & hosts, true , false ) ,
4404- "Note: set" ,
4405- ) ,
4406- (
4407- npm_allow_remote_configured_detail ( & hosts, false , false ) ,
4408- "Note: set" ,
4409- ) ,
4410- (
4411- npm_allow_remote_configured_detail ( & hosts, true , true ) ,
4412- "Note: would set" ,
4413- ) ,
4414- (
4415- npm_allow_remote_already_detail ( & hosts) ,
4416- "Note: .npmrc already" ,
4417- ) ,
4418- (
4419- npm_allow_remote_user_set_detail ( & hosts, "none" ) ,
4420- "Warning: npm >=12" ,
4421- ) ,
4422- (
4423- npm_allow_remote_env_set_detail ( & hosts, "npm_config_allow_remote" , "none" ) ,
4424- "Warning: npm >=12" ,
4425- ) ,
4394+ ( npm_allow_remote_configured_detail ( & hosts, true , false ) , "Note: set" ) ,
4395+ ( npm_allow_remote_configured_detail ( & hosts, false , false ) , "Note: set" ) ,
4396+ ( npm_allow_remote_configured_detail ( & hosts, true , true ) , "Note: would set" ) ,
4397+ ( npm_allow_remote_already_detail ( & hosts) , "Note: .npmrc already" ) ,
4398+ ( npm_allow_remote_user_set_detail ( & hosts, "none" ) , "Warning: npm >=12" ) ,
4399+ ( npm_allow_remote_env_set_detail ( & hosts, "npm_config_allow_remote" , "none" ) , "Warning: npm >=12" ) ,
44264400 ( npm_allow_remote_manual_detail ( & hosts) , "Warning: npm >=12" ) ,
4427- (
4428- npm_allow_remote_unreadable_detail ( & hosts, "is a symlink" ) ,
4429- "Warning: npm >=12" ,
4430- ) ,
4401+ ( npm_allow_remote_unreadable_detail ( & hosts, "is a symlink" ) , "Warning: npm >=12" ) ,
44314402 ] ;
44324403 for ( detail, start) in cases {
44334404 let line = npm_allow_remote_one_line ( & detail) ;
44344405 assert ! ( line. starts_with( start) , "{line}" ) ;
4435- assert ! (
4436- !line. contains( '\n' ) && line. ends_with( "(details: --verbose)." ) ,
4437- "{line}"
4438- ) ;
4406+ assert ! ( !line. contains( '\n' ) && line. ends_with( "(details: --verbose)." ) , "{line}" ) ;
44394407 }
44404408 }
44414409}
0 commit comments