Disable init file in batch mode.
authorTaylor R Campbell <campbell@mumble.net>
Thu, 3 Nov 2016 04:54:35 +0000 (04:54 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Thu, 3 Nov 2016 04:54:35 +0000 (04:54 +0000)
src/runtime/load.scm

index d37e3f55a23915907f7f9e9af8240d873f6a517a..ca9826c091a63213516ea6fc73dad324681bbe18 100644 (file)
@@ -521,10 +521,13 @@ USA.
                    (process-keyword (vector->list unused-command-line) '()))
              (for-each (lambda (act) (act))
                        (reverse after-parsing-actions))
-             (if (param:load-init-file?) (load-init-file)))))
+             (if (and (param:load-init-file?)
+                      (not (nearest-cmdl/batch-mode?)))
+                 (load-init-file)))))
        (begin
          (set! *unused-command-line* #f)
-         (load-init-file)))))
+         (if (not (nearest-cmdl/batch-mode?))
+             (load-init-file))))))
 
 (define (find-keyword-parser keyword)
   (let ((entry (assoc (strip-leading-hyphens keyword) *command-line-parsers*)))