~ chicken-core (chicken-5) cc7917272e08843575c4a89d0f3a2b45b9dd72ce


commit cc7917272e08843575c4a89d0f3a2b45b9dd72ce
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Mon Apr 30 21:42:51 2018 +0200
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Mon Apr 30 21:42:51 2018 +0200

    when argument list is empty, recent change for handling CHICKEN_OPTIONS produces error

diff --git a/chicken.scm b/chicken.scm
index f56a6ac3..78920f3b 100644
--- a/chicken.scm
+++ b/chicken.scm
@@ -51,10 +51,11 @@
 
 (define compiler-arguments
   (let ((args (cdr (argv))))
-    (append
-     (take args 1) ; Leave source filename argument first.
-     (string-split (or (get-environment-variable "CHICKEN_OPTIONS") ""))
-     (drop args 1))))
+    (if (null? args)
+        '()
+        (append (take args 1) ; Leave source filename argument first.
+                (string-split (or (get-environment-variable "CHICKEN_OPTIONS") ""))
+                (drop args 1)))))
 
 
 ;;; Process command-line options:
Trap