Skip to content

Commit 4169132

Browse files
committed
refactor(profile): 将Write-Host输出改为Write-Debug以降低噪音
修改环境初始化脚本中的信息输出方式,使用Write-Debug替代Write-Host,避免在非调试模式下产生不必要的输出信息,保持控制台整洁。
1 parent 84ea54b commit 4169132

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

profile/profile.ps1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function Init-Environment {
4848
Write-Verbose "启用代理设置: $ProxyUrl"
4949
$Env:http_proxy = $ProxyUrl
5050
$Env:https_proxy = $ProxyUrl
51-
Write-Host "已设置代理: $ProxyUrl" -ForegroundColor Green
51+
Write-Debug "已设置代理: $ProxyUrl"
5252
}
5353
else {
5454
Write-Verbose "跳过代理设置"
@@ -138,11 +138,12 @@ function Init-Environment {
138138
Add-CondaEnv
139139
}
140140

141-
Write-Host "PowerShell环境初始化完成" -ForegroundColor Green
141+
# Write-Host "PowerShell环境初始化完成" -ForegroundColor Green
142+
Write-Debug "PowerShell环境初始化完成"
142143
}
143144

144145
# 调用环境初始化函数
145-
Init-Environment
146+
Init-Environment
146147

147148
# 配置git,解决中文文件名不能正常显示的问题
148149
# git config --global core.quotepath false

0 commit comments

Comments
 (0)