1
0
Fork 0

- notified an error when the manpage can not be printed on screen.

This commit is contained in:
cage 2021-09-12 12:16:29 +02:00
parent eaa0feb95c
commit dcde779d25
3 changed files with 18 additions and 7 deletions

View File

@ -90,6 +90,12 @@
:output output :output output
:error error)) :error error))
(defun process-exit-code (process)
(sb-ext:process-exit-code process))
(defun process-exit-success-p (process)
(= (process-exit-code process) 0))
(defun open-with-editor (file) (defun open-with-editor (file)
(multiple-value-bind (exe args) (multiple-value-bind (exe args)
(external-editor) (external-editor)

View File

@ -339,6 +339,9 @@
:getenv :getenv
:default-temp-dir :default-temp-dir
:pwd :pwd
:run-external-program
:process-exit-code
:process-exit-success-p
:open-with-editor :open-with-editor
:exit-program :exit-program
:user-cache-dir :user-cache-dir

View File

@ -26,13 +26,15 @@
(progn (progn
(croatoan:end-screen) (croatoan:end-screen)
(tui:with-notify-errors (tui:with-notify-errors
(os-utils::run-external-program +man-bin+ (let ((process (os-utils:run-external-program +man-bin+
(list +program-name+) (list +program-name+)
:search t :search t
:wait t :wait t
:input t :input t
:output t :output t
:error t))) :error t)))
(when (not (os-utils:process-exit-success-p process))
(error (_ "Unable to load manual, contact your system administrator"))))))
#-man-bin #-man-bin
(notify (_ "No manpage binary found on this system") :as-error t)) (notify (_ "No manpage binary found on this system") :as-error t))