Improve efficiency of current directory detection

Use $PWD.Path instead of Get-Location | Select-Object for better performance

Co-authored-by: ccmywish <63459097+ccmywish@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-06 04:36:51 +00:00
committed by 曾奥然
parent 6cbd03ac78
commit d87fa49b2e

View File

@@ -110,7 +110,7 @@ function Set_Install_Dir {
output_info "Detected Downloads directory: $Directory"
} else {
# 使用当前目录作为默认值
$Directory = Get-Location | Select-Object -ExpandProperty Path
$Directory = $PWD.Path
output_info "Using current directory: $Directory"
}
}