We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我运行了 chsrc set flutter
chsrc set flutter
写入了 PowerShell Profile,而不是设置用户环境变量
chsrc/src/recipe/lang/Dart/Flutter.c
Lines 61 to 70 in 09fba2b
Windows 下应该设置用户级别的环境变量,使其对所有程序永久生效,如:
[System.Environment]::SetEnvironmentVariable('PUB_HOSTED_URL', 'https://pub.flutter-io.cn', 'User') [System.Environment]::SetEnvironmentVariable('FLUTTER_STORAGE_BASE_URL', 'https://storage.flutter-io.cn', 'User')
这里使用了PowerShell 调用 System.Environment 类 实现,可以用类似的方法修改环境
v0.2.0-2025/03/14
Windows
Microsoft Windows [Version 10.0.19045.5608]
❯ chsrc set flutter [chsrc 测速] 测速中 x 上游默认源 URL未知,邀您参与贡献! - 上海交通大学致远镜像站 ... 39.95 MByte/s - 清华大学开源软件镜像站 ... 47.56 MByte/s - 南京大学开源镜像站 ... 42.63 MByte/s 最快镜像站: 清华大学开源软件镜像站 选中镜像站: TUNA (tuna) -------------------------------- [chsrc 写入] C:\Users\Xiaoran\Documents\PowerShell\Microsoft.PowerShell_profile.ps1 -------------------------------- chsrc: 全自动换源完成, 感谢镜像提供方: 清华大学开源软件镜像站 ❯ cat C:\Users\Xiaoran\Documents\PowerShell\Microsoft.PowerShell_profile.ps1 ... $env:FLUTTER_STORAGE_BASE_URL = "https://mirrors.tuna.tsinghua.edu.cn/git/flutter"
The text was updated successfully, but these errors were encountered:
感谢指正 @xrgzs 👍
有兴趣直接修改代码提交PR吗?
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
你操作了什么?
我运行了
chsrc set flutter
发生了什么?
写入了 PowerShell Profile,而不是设置用户环境变量
chsrc/src/recipe/lang/Dart/Flutter.c
Lines 61 to 70 in 09fba2b
本应该怎么样?
Windows 下应该设置用户级别的环境变量,使其对所有程序永久生效,如:
这里使用了PowerShell 调用 System.Environment 类 实现,可以用类似的方法修改环境
chsrc 版本
v0.2.0-2025/03/14
你使用的是哪个操作系统?
Windows
OS 版本 / OS 发行版
Microsoft Windows [Version 10.0.19045.5608]
Log 输出
防止重复问题
The text was updated successfully, but these errors were encountered: