@@ -934,8 +934,7 @@ pub(crate) async fn run_redirect_selected(
934934 socket_patch_core:: utils:: fs:: read_regular_to_string_sync ( path) . ok ( )
935935 } )
936936 } ;
937- let rewrite_options = || {
938- RewriteOptions {
937+ let rewrite_options = || RewriteOptions {
939938 dry_run : common. dry_run ,
940939 targets_pipenv_lock,
941940 pipenv_major,
@@ -947,7 +946,6 @@ pub(crate) async fn run_redirect_selected(
947946 npm_allow_remote_config : !common. no_npm_allow_remote_config ,
948947 npm_outer : & npm_outer,
949948 blocking : true ,
950- }
951949 } ;
952950 // The rollout gate plans again without its deferred rows: keep what
953951 // the second pass needs.
@@ -2173,19 +2171,13 @@ fn join_names(names: &[String], max: usize) -> String {
21732171/// artifacts, then verify with `vex`. After a vendored→hosted takeover
21742172/// (`vendored_removed`) the commit also has to carry the deleted vendored
21752173/// ledger entries and artifacts.
2176- fn format_next_steps (
2177- files : & [ String ] ,
2178- edits : & [ socket_patch_core:: patch:: redirect:: FileEdit ] ,
2179- vendored_removed : bool ,
2180- ) -> Vec < String > {
2174+ fn format_next_steps ( files : & [ String ] , edits : & [ socket_patch_core:: patch:: redirect:: FileEdit ] , vendored_removed : bool ) -> Vec < String > {
21812175 if files. is_empty ( ) && !vendored_removed {
21822176 return Vec :: new ( ) ;
21832177 }
21842178 let mut commit: Vec < String > = Vec :: new ( ) ;
21852179 if vendored_removed {
2186- commit. push (
2187- ".socket/vendor/ (the removed vendored ledger entries and artifacts)" . to_string ( ) ,
2188- ) ;
2180+ commit. push ( ".socket/vendor/ (the removed vendored ledger entries and artifacts)" . to_string ( ) ) ;
21892181 }
21902182 commit. extend ( files. iter ( ) . cloned ( ) ) ;
21912183 let npm = files
@@ -4168,43 +4160,19 @@ mod tests {
41684160 use super :: npm_allow_remote_one_line;
41694161 let hosts = [ "patch.socket.dev" ] ;
41704162 let cases = [
4171- (
4172- npm_allow_remote_configured_detail ( & hosts, true , false ) ,
4173- "Note: set" ,
4174- ) ,
4175- (
4176- npm_allow_remote_configured_detail ( & hosts, false , false ) ,
4177- "Note: set" ,
4178- ) ,
4179- (
4180- npm_allow_remote_configured_detail ( & hosts, true , true ) ,
4181- "Note: would set" ,
4182- ) ,
4183- (
4184- npm_allow_remote_already_detail ( & hosts) ,
4185- "Note: .npmrc already" ,
4186- ) ,
4187- (
4188- npm_allow_remote_user_set_detail ( & hosts, "none" ) ,
4189- "Warning: npm >=12" ,
4190- ) ,
4191- (
4192- npm_allow_remote_env_set_detail ( & hosts, "npm_config_allow_remote" , "none" ) ,
4193- "Warning: npm >=12" ,
4194- ) ,
4163+ ( npm_allow_remote_configured_detail ( & hosts, true , false ) , "Note: set" ) ,
4164+ ( npm_allow_remote_configured_detail ( & hosts, false , false ) , "Note: set" ) ,
4165+ ( npm_allow_remote_configured_detail ( & hosts, true , true ) , "Note: would set" ) ,
4166+ ( npm_allow_remote_already_detail ( & hosts) , "Note: .npmrc already" ) ,
4167+ ( npm_allow_remote_user_set_detail ( & hosts, "none" ) , "Warning: npm >=12" ) ,
4168+ ( npm_allow_remote_env_set_detail ( & hosts, "npm_config_allow_remote" , "none" ) , "Warning: npm >=12" ) ,
41954169 ( npm_allow_remote_manual_detail ( & hosts) , "Warning: npm >=12" ) ,
4196- (
4197- npm_allow_remote_unreadable_detail ( & hosts, "is a symlink" ) ,
4198- "Warning: npm >=12" ,
4199- ) ,
4170+ ( npm_allow_remote_unreadable_detail ( & hosts, "is a symlink" ) , "Warning: npm >=12" ) ,
42004171 ] ;
42014172 for ( detail, start) in cases {
42024173 let line = npm_allow_remote_one_line ( & detail) ;
42034174 assert ! ( line. starts_with( start) , "{line}" ) ;
4204- assert ! (
4205- !line. contains( '\n' ) && line. ends_with( "(details: --verbose)." ) ,
4206- "{line}"
4207- ) ;
4175+ assert ! ( !line. contains( '\n' ) && line. ends_with( "(details: --verbose)." ) , "{line}" ) ;
42084176 }
42094177 }
42104178}
0 commit comments