Skip to content

Commit d87fa49

Browse files
Copilotccmywish
andcommitted
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>
1 parent 6cbd03a commit d87fa49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tool/installer.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ function Set_Install_Dir {
110110
output_info "Detected Downloads directory: $Directory"
111111
} else {
112112
# 使用当前目录作为默认值
113-
$Directory = Get-Location | Select-Object -ExpandProperty Path
113+
$Directory = $PWD.Path
114114
output_info "Using current directory: $Directory"
115115
}
116116
}

0 commit comments

Comments
 (0)