@@ -934,7 +934,8 @@ 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 = || RewriteOptions {
937+ let rewrite_options = || {
938+ RewriteOptions {
938939 dry_run : common. dry_run ,
939940 targets_pipenv_lock,
940941 pipenv_major,
@@ -946,6 +947,7 @@ pub(crate) async fn run_redirect_selected(
946947 npm_allow_remote_config : !common. no_npm_allow_remote_config ,
947948 npm_outer : & npm_outer,
948949 blocking : true ,
950+ }
949951 } ;
950952 // The rollout gate plans again without its deferred rows: keep what
951953 // the second pass needs.
@@ -2171,13 +2173,19 @@ fn join_names(names: &[String], max: usize) -> String {
21712173/// artifacts, then verify with `vex`. After a vendored→hosted takeover
21722174/// (`vendored_removed`) the commit also has to carry the deleted vendored
21732175/// ledger entries and artifacts.
2174- fn format_next_steps ( files : & [ String ] , edits : & [ socket_patch_core:: patch:: redirect:: FileEdit ] , vendored_removed : bool ) -> Vec < String > {
2176+ fn format_next_steps (
2177+ files : & [ String ] ,
2178+ edits : & [ socket_patch_core:: patch:: redirect:: FileEdit ] ,
2179+ vendored_removed : bool ,
2180+ ) -> Vec < String > {
21752181 if files. is_empty ( ) && !vendored_removed {
21762182 return Vec :: new ( ) ;
21772183 }
21782184 let mut commit: Vec < String > = Vec :: new ( ) ;
21792185 if vendored_removed {
2180- commit. push ( ".socket/vendor/ (the removed vendored ledger entries and artifacts)" . to_string ( ) ) ;
2186+ commit. push (
2187+ ".socket/vendor/ (the removed vendored ledger entries and artifacts)" . to_string ( ) ,
2188+ ) ;
21812189 }
21822190 commit. extend ( files. iter ( ) . cloned ( ) ) ;
21832191 let npm = files
@@ -4162,19 +4170,43 @@ mod tests {
41624170 use super :: npm_allow_remote_one_line;
41634171 let hosts = [ "patch.socket.dev" ] ;
41644172 let cases = [
4165- ( npm_allow_remote_configured_detail ( & hosts, true , false ) , "Note: set" ) ,
4166- ( npm_allow_remote_configured_detail ( & hosts, false , false ) , "Note: set" ) ,
4167- ( npm_allow_remote_configured_detail ( & hosts, true , true ) , "Note: would set" ) ,
4168- ( npm_allow_remote_already_detail ( & hosts) , "Note: .npmrc already" ) ,
4169- ( npm_allow_remote_user_set_detail ( & hosts, "none" ) , "Warning: npm >=12" ) ,
4170- ( npm_allow_remote_env_set_detail ( & hosts, "npm_config_allow_remote" , "none" ) , "Warning: npm >=12" ) ,
4173+ (
4174+ npm_allow_remote_configured_detail ( & hosts, true , false ) ,
4175+ "Note: set" ,
4176+ ) ,
4177+ (
4178+ npm_allow_remote_configured_detail ( & hosts, false , false ) ,
4179+ "Note: set" ,
4180+ ) ,
4181+ (
4182+ npm_allow_remote_configured_detail ( & hosts, true , true ) ,
4183+ "Note: would set" ,
4184+ ) ,
4185+ (
4186+ npm_allow_remote_already_detail ( & hosts) ,
4187+ "Note: .npmrc already" ,
4188+ ) ,
4189+ (
4190+ npm_allow_remote_user_set_detail ( & hosts, "none" ) ,
4191+ "Warning: npm >=12" ,
4192+ ) ,
4193+ (
4194+ npm_allow_remote_env_set_detail ( & hosts, "npm_config_allow_remote" , "none" ) ,
4195+ "Warning: npm >=12" ,
4196+ ) ,
41714197 ( npm_allow_remote_manual_detail ( & hosts) , "Warning: npm >=12" ) ,
4172- ( npm_allow_remote_unreadable_detail ( & hosts, "is a symlink" ) , "Warning: npm >=12" ) ,
4198+ (
4199+ npm_allow_remote_unreadable_detail ( & hosts, "is a symlink" ) ,
4200+ "Warning: npm >=12" ,
4201+ ) ,
41734202 ] ;
41744203 for ( detail, start) in cases {
41754204 let line = npm_allow_remote_one_line ( & detail) ;
41764205 assert ! ( line. starts_with( start) , "{line}" ) ;
4177- assert ! ( !line. contains( '\n' ) && line. ends_with( "(details: --verbose)." ) , "{line}" ) ;
4206+ assert ! (
4207+ !line. contains( '\n' ) && line. ends_with( "(details: --verbose)." ) ,
4208+ "{line}"
4209+ ) ;
41784210 }
41794211 }
41804212}
0 commit comments