mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Update test helper procedure 'get_pwd' to handle the ComSpec environment variable being absent.
FossilOrigin-Name: fe1979552f43e0526f16481457e01981f29707401f77079f9854a8d91b35b5a4
This commit is contained in:
@ -174,8 +174,14 @@ proc get_pwd {} {
|
||||
# case of the result to what Tcl considers canonical, which would
|
||||
# defeat the purpose of this procedure.
|
||||
#
|
||||
if {[info exists ::env(ComSpec)]} {
|
||||
set comSpec $::env(ComSpec)
|
||||
} else {
|
||||
# NOTE: Hard-code the typical default value.
|
||||
set comSpec {C:\Windows\system32\cmd.exe}
|
||||
}
|
||||
return [string map [list \\ /] \
|
||||
[string trim [exec -- $::env(ComSpec) /c echo %CD%]]]
|
||||
[string trim [exec -- $comSpec /c echo %CD%]]]
|
||||
} else {
|
||||
return [pwd]
|
||||
}
|
||||
|
Reference in New Issue
Block a user