diff options
author | mistachkin <mistachkin@noemail.net> | 2021-01-18 19:27:56 +0000 |
---|---|---|
committer | mistachkin <mistachkin@noemail.net> | 2021-01-18 19:27:56 +0000 |
commit | f3ebea8114feb2798ffd2f12dd1b9a2a1b0d418f (patch) | |
tree | 62102a2d8c5a106ed8be27ead546fd58066d4528 /test/tester.tcl | |
parent | abc6b67aff84686a5b5a0d2dbefea98457b3556f (diff) | |
download | sqlite-f3ebea8114feb2798ffd2f12dd1b9a2a1b0d418f.tar.gz sqlite-f3ebea8114feb2798ffd2f12dd1b9a2a1b0d418f.zip |
Update test helper procedure 'get_pwd' to handle the ComSpec environment variable being absent.
FossilOrigin-Name: fe1979552f43e0526f16481457e01981f29707401f77079f9854a8d91b35b5a4
Diffstat (limited to 'test/tester.tcl')
-rw-r--r-- | test/tester.tcl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/tester.tcl b/test/tester.tcl index 7ef059571..5c72dccbb 100644 --- a/test/tester.tcl +++ b/test/tester.tcl @@ -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] } |