Skip to content

Commit f5878f8

Browse files
authored
Update os-settings.md for windows set mirror env (#11793)
On Windows devices, the current document requires manual modification of the current directory. After modification, it can achieve the same effect as using pwd on Linux to read the current working directory.
1 parent fa75cf2 commit f5878f8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/_includes/docs/community/china/os-settings.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@
1212
{% capture setpath -%}{{envvarset}}PATH = $pwd.PATH + "/flutter/bin",$env:PATH -join ";"{% endcapture -%}
1313
{% capture newdir -%}{{prompt}} New-Item -Path '{{installdirsuggestion}}' -ItemType Directory{% endcapture -%}
1414
{% capture unzip -%} {{prompt}} Expand-Archive .\{% endcapture -%}
15-
{% capture permaddexample -%}
16-
$newPath = "$pwd\flutter\bin;$env:PATH"
15+
{% capture permaddexample -%}
16+
# cd to flutter dir
17+
$currentDirectory = Get-Location
18+
$newPath = "$currentDirectory\bin;$env:PATH"
1719
[System.Environment]::SetEnvironmentVariable('Path', $newPath, 'User')
1820
[System.Environment]::SetEnvironmentVariable('PUB_HOSTED_URL', 'https://pub.flutter-io.cn', 'User')
1921
[System.Environment]::SetEnvironmentVariable('FLUTTER_STORAGE_BASE_URL', 'https://storage.flutter-io.cn', 'User')
22+
23+
Write-Host ". $PROFILE"
2024
{% endcapture -%}
2125
{% else -%}
2226
{% assign shell = 'your terminal' -%}

0 commit comments

Comments
 (0)