fix handling of empty paths in PATH on Windows
Check for an empty path after dropping `"`s, instead of before. Otherwise, a bad PATH setting interferes with functions like `find-executable-path`, which in turn can prevent DrRacket from starting up. Closes PR 14930
This commit is contained in:
parent
719917f812
commit
33da6564a1
File diff suppressed because it is too large
Load Diff
|
@ -293,12 +293,13 @@
|
|||
" \":\")))"
|
||||
" (format \"([^~a]*)~a(.*)\" sep sep)))))"
|
||||
"(cons-path(lambda(default s l) "
|
||||
"(let((s(if(eq?(system-type) 'windows)"
|
||||
" (regexp-replace* #rx#\"\\\"\" s #\"\")"
|
||||
" s)))"
|
||||
" (if (bytes=? s #\"\")"
|
||||
"(append default l)"
|
||||
"(cons(bytes->path(if(eq?(system-type) 'windows)"
|
||||
" (regexp-replace* #rx#\"\\\"\" s #\"\")"
|
||||
" s))"
|
||||
" l)))))"
|
||||
"(cons(bytes->path s)"
|
||||
" l))))))"
|
||||
"(lambda(s default)"
|
||||
"(unless(or(bytes? s)"
|
||||
"(string? s))"
|
||||
|
|
|
@ -349,12 +349,13 @@
|
|||
":")))
|
||||
(format "([^~a]*)~a(.*)" sep sep)))))
|
||||
(cons-path (lambda (default s l)
|
||||
(if (bytes=? s #"")
|
||||
(append default l)
|
||||
(cons (bytes->path (if (eq? (system-type) 'windows)
|
||||
(regexp-replace* #rx#"\"" s #"")
|
||||
s))
|
||||
l)))))
|
||||
(let ([s (if (eq? (system-type) 'windows)
|
||||
(regexp-replace* #rx#"\"" s #"")
|
||||
s)])
|
||||
(if (bytes=? s #"")
|
||||
(append default l)
|
||||
(cons (bytes->path s)
|
||||
l))))))
|
||||
(lambda (s default)
|
||||
(unless (or (bytes? s)
|
||||
(string? s))
|
||||
|
|
Loading…
Reference in New Issue
Block a user