src/default.scm: add missing logic in system-hostname-check #2

Merged
kreyren merged 2 commits from :molese-patch into ALPHA 2021-11-30 08:03:59 +01:00

@ -7,10 +7,11 @@
;; FIXME(Krey): Process DOMAIN ;; FIXME(Krey): Process DOMAIN
;; function to print error if environment variable 'HOSTNAME' is not set or if it's value is empty ;; function to throw error if environment variable 'HOSTNAME' is not set
; or if it's value is empty
Review

don't split things across multiple lines

don't split things across multiple lines
;; FIXME-QA(Molese): Needs test ;; FIXME-QA(Molese): Needs test
(define system-hostname-check (lambda () (define system-hostname-check (lambda ()
(if (not (system-hostname-set?)) (if (eq nil (getenv "HOSTNAME"))
Review

(if (empty? (getenv "HOSTNAME"... ?

(if (empty? (getenv "HOSTNAME"... ?
(throw 1 "Environment variable 'HOSTNAME' is not set, unable to apply sufficient configuration")) (throw 1 "Environment variable 'HOSTNAME' is not set, unable to apply sufficient configuration"))
(if (eq? (getenv "HOSTNAME") #f) (if (eq? (getenv "HOSTNAME") #f)
(throw 1 "Environment variable 'HOSTNAME' is empty, unable to apply sufficient configuration")))) (throw 1 "Environment variable 'HOSTNAME' is empty, unable to apply sufficient configuration"))))