mirror of
https://github.com/RubyMetric/chsrc
synced 2026-02-02 15:50:29 +08:00
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:
committed by
曾奥然
parent
6cbd03ac78
commit
d87fa49b2e
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user