@@ -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
@@ -4103,43 +4095,19 @@ mod tests {
41034095 use super :: npm_allow_remote_one_line;
41044096 let hosts = [ "patch.socket.dev" ] ;
41054097 let cases = [
4106- (
4107- npm_allow_remote_configured_detail ( & hosts, true , false ) ,
4108- "Note: set" ,
4109- ) ,
4110- (
4111- npm_allow_remote_configured_detail ( & hosts, false , false ) ,
4112- "Note: set" ,
4113- ) ,
4114- (
4115- npm_allow_remote_configured_detail ( & hosts, true , true ) ,
4116- "Note: would set" ,
4117- ) ,
4118- (
4119- npm_allow_remote_already_detail ( & hosts) ,
4120- "Note: .npmrc already" ,
4121- ) ,
4122- (
4123- npm_allow_remote_user_set_detail ( & hosts, "none" ) ,
4124- "Warning: npm >=12" ,
4125- ) ,
4126- (
4127- npm_allow_remote_env_set_detail ( & hosts, "npm_config_allow_remote" , "none" ) ,
4128- "Warning: npm >=12" ,
4129- ) ,
4098+ ( npm_allow_remote_configured_detail ( & hosts, true , false ) , "Note: set" ) ,
4099+ ( npm_allow_remote_configured_detail ( & hosts, false , false ) , "Note: set" ) ,
4100+ ( npm_allow_remote_configured_detail ( & hosts, true , true ) , "Note: would set" ) ,
4101+ ( npm_allow_remote_already_detail ( & hosts) , "Note: .npmrc already" ) ,
4102+ ( npm_allow_remote_user_set_detail ( & hosts, "none" ) , "Warning: npm >=12" ) ,
4103+ ( npm_allow_remote_env_set_detail ( & hosts, "npm_config_allow_remote" , "none" ) , "Warning: npm >=12" ) ,
41304104 ( npm_allow_remote_manual_detail ( & hosts) , "Warning: npm >=12" ) ,
4131- (
4132- npm_allow_remote_unreadable_detail ( & hosts, "is a symlink" ) ,
4133- "Warning: npm >=12" ,
4134- ) ,
4105+ ( npm_allow_remote_unreadable_detail ( & hosts, "is a symlink" ) , "Warning: npm >=12" ) ,
41354106 ] ;
41364107 for ( detail, start) in cases {
41374108 let line = npm_allow_remote_one_line ( & detail) ;
41384109 assert ! ( line. starts_with( start) , "{line}" ) ;
4139- assert ! (
4140- !line. contains( '\n' ) && line. ends_with( "(details: --verbose)." ) ,
4141- "{line}"
4142- ) ;
4110+ assert ! ( !line. contains( '\n' ) && line. ends_with( "(details: --verbose)." ) , "{line}" ) ;
41434111 }
41444112 }
41454113}
0 commit comments