@@ -216,15 +216,9 @@ but will not be added automatically."
216
216
}
217
217
218
218
#[ cfg( not( windows) ) ]
219
- macro_rules! post_install_msg_unix {
219
+ macro_rules! post_install_msg_unix_source_env {
220
220
( ) => {
221
- r#"# Rust is installed now. Great!
222
-
223
- To get started you may need to restart your current shell.
224
- This would reload your `PATH` environment variable to include
225
- Cargo's bin directory ({cargo_home}/bin).
226
-
227
- To configure your current shell, you need to source
221
+ r#"To configure your current shell, you need to source
228
222
the corresponding `env` file under {cargo_home}.
229
223
230
224
This is usually done by running one of the following:
@@ -235,6 +229,22 @@ This is usually done by running one of the following:
235
229
} ;
236
230
}
237
231
232
+ #[ cfg( not( windows) ) ]
233
+ macro_rules! post_install_msg_unix {
234
+ ( ) => {
235
+ concat!(
236
+ r"# Rust is installed now. Great!
237
+
238
+ To get started you may need to restart your current shell.
239
+ This would reload your `PATH` environment variable to include
240
+ Cargo's bin directory ({cargo_home}/bin).
241
+
242
+ " ,
243
+ post_install_msg_unix_source_env!( ) ,
244
+ )
245
+ } ;
246
+ }
247
+
238
248
#[ cfg( windows) ]
239
249
macro_rules! post_install_msg_win {
240
250
( ) => {
@@ -251,19 +261,15 @@ Cargo's bin directory ({cargo_home}\\bin).
251
261
#[ cfg( not( windows) ) ]
252
262
macro_rules! post_install_msg_unix_no_modify_path {
253
263
( ) => {
254
- r#"# Rust is installed now. Great!
264
+ concat!(
265
+ r"# Rust is installed now. Great!
255
266
256
267
To get started you need Cargo's bin directory ({cargo_home}/bin) in your `PATH`
257
268
environment variable. This has not been done automatically.
258
269
259
- To configure your current shell, you need to source
260
- the corresponding `env` file under {cargo_home}.
261
-
262
- This is usually done by running one of the following:
263
- source "{cargo_home}/env" # For bash/zsh
264
- . "{cargo_home}/env" # For ash/dash/pdksh (note the leading DOT)
265
- source "{cargo_home}/env.fish" # For fish
266
- "#
270
+ " ,
271
+ post_install_msg_unix_source_env!( ) ,
272
+ )
267
273
} ;
268
274
}
269
275
0 commit comments