Commit ca9ff744 authored by Antoine Martin's avatar Antoine Martin
Browse files

Make logging of errors optional

Fixes #46
parent aa66c4d5
...@@ -53,10 +53,10 @@ ...@@ -53,10 +53,10 @@
(dolist (release (ql-dist:provided-releases t)) (dolist (release (ql-dist:provided-releases t))
(ql-dist:uninstall release))) (ql-dist:uninstall release)))
(defun refresh (makeinfo-path) (defun refresh (makeinfo-path &key (log-errors t))
(uninstall-releases) (uninstall-releases)
(ql:update-all-dists :prompt nil) (ql:update-all-dists :prompt nil)
(ql:update-client :prompt nil) (ql:update-client :prompt nil)
(build-releases) (build-releases)
(build-texis makeinfo-path) (build-texis makeinfo-path :log-errors log-errors)
(build-index)) (build-index))
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
:if-does-not-exist :create) :if-does-not-exist :create)
(format file err)))) (format file err))))
(defun build-texi (texi makeinfo-path) (defun build-texi (texi makeinfo-path &key (log-errors t))
(let ((out (with-output-to-string (out) (let ((out (with-output-to-string (out)
(sb-ext:run-program (sb-ext:run-program
makeinfo-path makeinfo-path
...@@ -136,12 +136,13 @@ ...@@ -136,12 +136,13 @@
"-c" "TOP_NODE_UP_URL=/" "-c" "TOP_NODE_UP_URL=/"
"--force") "--force")
:output out)))) :output out))))
(when (not (string= out "")) (when (and log-errors
(not (string= out "")))
(log-texi-error out texi)))) (log-texi-error out texi))))
(defun build-texis (makeinfo-path) (defun build-texis (makeinfo-path &key (log-errors t))
(clean-or-create (from-homedir "quickref/")) (clean-or-create (from-homedir "quickref/"))
(clean-or-create (from-homedir "texi-logfiles/")) (clean-or-create (from-homedir "texi-logfiles/"))
(let ((texis (get-texi-pathnames))) (let ((texis (get-texi-pathnames)))
(dolist (texi texis) (dolist (texi texis)
(build-texi texi makeinfo-path)))) (build-texi texi makeinfo-path :log-errors log-errors))))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment