Skip to content

Commit 082db1a

Browse files
authored
Fix syntax of Powershell environment variables
Use `${env:USERPROFILE}` rather than `%USERPROFILE%` - the latter is valid in CMD, but not in Powershell.
1 parent 444983e commit 082db1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rustup-cli/help.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,13 +234,13 @@ r"DISCUSSION:
234234
235235
Now open the file provided by `$profile` (if you used the
236236
`New-Item` command it will be
237-
`%USERPROFILE%\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1`
237+
`${env:USERPROFILE}\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1`
238238
239239
Next, we either save the completions file into our profile, or
240240
into a separate file and source it inside our profile. To save the
241241
completions into our profile simply use
242242
243-
PS C:\> rustup completions powershell >> %USERPROFILE%\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1";
243+
PS C:\> rustup completions powershell >> ${env:USERPROFILE}\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1";
244244

245245
pub static TOOLCHAIN_ARG_HELP: &'static str = "Toolchain name, such as 'stable', 'nightly', \
246246
or '1.8.0'. For more information see `rustup \

0 commit comments

Comments
 (0)