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
: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)
(multiple-value-bind (exe args)
(external-editor)

View File

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

View File

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