File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -86,9 +86,9 @@ macro_rules! pre_install_msg_unix {
8686 ( ) => {
8787pre_install_msg_template!(
8888"This path will then be added to your `PATH` environment variable by
89- modifying the profile file located at:
89+ modifying the profile file{plural} located at:
9090
91- {rcfiles}"
91+ {rcfiles}"
9292 ) } ;
9393}
9494
@@ -492,10 +492,13 @@ fn pre_install_msg(no_modify_path: bool) -> Result<String> {
492492 None
493493 }
494494 } ) . collect :: < Vec < _ > > ( ) ;
495- assert_eq ! ( rcfiles. len( ) , 1 ) ; // Only modifying .profile
495+ let plural = if rcfiles. len ( ) > 1 { "s" } else { "" } ;
496+ let rcfiles = rcfiles. into_iter ( ) . map ( |f| format ! ( " {}" , f) ) . collect :: < Vec < _ > > ( ) ;
497+ let rcfiles = rcfiles. join ( "\n " ) ;
496498 Ok ( format ! ( pre_install_msg_unix!( ) ,
497499 cargo_home_bin = cargo_home_bin. display( ) ,
498- rcfiles = rcfiles[ 0 ] ) )
500+ plural = plural,
501+ rcfiles = rcfiles) )
499502 } else {
500503 Ok ( format ! ( pre_install_msg_win!( ) ,
501504 cargo_home_bin = cargo_home_bin. display( ) ) )
You can’t perform that action at this time.
0 commit comments