@@ -932,7 +932,8 @@ 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 = || RewriteOptions {
935+ let rewrite_options = || {
936+ RewriteOptions {
936937 dry_run : common. dry_run ,
937938 targets_pipenv_lock,
938939 pipenv_major,
@@ -944,6 +945,7 @@ pub(crate) async fn run_redirect_selected(
944945 npm_allow_remote_config : !common. no_npm_allow_remote_config ,
945946 npm_outer : & npm_outer,
946947 blocking : true ,
948+ }
947949 } ;
948950 // The rollout gate plans again without its deferred rows: keep what
949951 // the second pass needs.
@@ -2304,13 +2306,19 @@ fn join_names(names: &[String], max: usize) -> String {
23042306/// artifacts, then verify with `vex`. After a vendored→hosted takeover
23052307/// (`vendored_removed`) the commit also has to carry the deleted vendored
23062308/// ledger entries and artifacts.
2307- fn format_next_steps ( files : & [ String ] , edits : & [ socket_patch_core:: patch:: redirect:: FileEdit ] , vendored_removed : bool ) -> Vec < String > {
2309+ fn format_next_steps (
2310+ files : & [ String ] ,
2311+ edits : & [ socket_patch_core:: patch:: redirect:: FileEdit ] ,
2312+ vendored_removed : bool ,
2313+ ) -> Vec < String > {
23082314 if files. is_empty ( ) && !vendored_removed {
23092315 return Vec :: new ( ) ;
23102316 }
23112317 let mut commit: Vec < String > = Vec :: new ( ) ;
23122318 if vendored_removed {
2313- commit. push ( ".socket/vendor/ (the removed vendored ledger entries and artifacts)" . to_string ( ) ) ;
2319+ commit. push (
2320+ ".socket/vendor/ (the removed vendored ledger entries and artifacts)" . to_string ( ) ,
2321+ ) ;
23142322 }
23152323 commit. extend ( files. iter ( ) . cloned ( ) ) ;
23162324 let npm = files
@@ -4391,19 +4399,43 @@ mod tests {
43914399 use super :: npm_allow_remote_one_line;
43924400 let hosts = [ "patch.socket.dev" ] ;
43934401 let cases = [
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" ) ,
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+ ) ,
44004426 ( npm_allow_remote_manual_detail ( & hosts) , "Warning: npm >=12" ) ,
4401- ( npm_allow_remote_unreadable_detail ( & hosts, "is a symlink" ) , "Warning: npm >=12" ) ,
4427+ (
4428+ npm_allow_remote_unreadable_detail ( & hosts, "is a symlink" ) ,
4429+ "Warning: npm >=12" ,
4430+ ) ,
44024431 ] ;
44034432 for ( detail, start) in cases {
44044433 let line = npm_allow_remote_one_line ( & detail) ;
44054434 assert ! ( line. starts_with( start) , "{line}" ) ;
4406- assert ! ( !line. contains( '\n' ) && line. ends_with( "(details: --verbose)." ) , "{line}" ) ;
4435+ assert ! (
4436+ !line. contains( '\n' ) && line. ends_with( "(details: --verbose)." ) ,
4437+ "{line}"
4438+ ) ;
44074439 }
44084440 }
44094441}
0 commit comments