If $HOME is unset, consult (user-info (user-uid)) for the value of home-directory.
This commit is contained in:
parent
7acad294ac
commit
3ce5de8758
|
@ -963,10 +963,20 @@
|
||||||
|
|
||||||
(define (init-scsh-vars quietly?)
|
(define (init-scsh-vars quietly?)
|
||||||
(set! home-directory
|
(set! home-directory
|
||||||
(cond ((getenv "HOME") => ensure-file-name-is-nondirectory)
|
(cond ((getenv "HOME") => ensure-file-name-is-nondirectory)
|
||||||
(else (if (not quietly?)
|
;; loosing at this point would be really bad, so some
|
||||||
(warn "Starting up with no home directory ($HOME)."))
|
;; paranoia comes in order
|
||||||
"/")))
|
(else (call-with-current-continuation
|
||||||
|
(lambda (k)
|
||||||
|
(with-handler
|
||||||
|
(lambda (condition more)
|
||||||
|
(cond ((not quietly?)
|
||||||
|
(display "Starting up with no home directory ($HOME).")
|
||||||
|
(newline)))
|
||||||
|
(k "/"))
|
||||||
|
(lambda ()
|
||||||
|
(user-info:home-dir (user-info (user-uid))))))))))
|
||||||
|
|
||||||
(set-fluid! exec-path-list
|
(set-fluid! exec-path-list
|
||||||
(cond ((getenv "PATH") => split-colon-list)
|
(cond ((getenv "PATH") => split-colon-list)
|
||||||
(else (if (not quietly?)
|
(else (if (not quietly?)
|
||||||
|
|
Loading…
Reference in New Issue