diff options
Diffstat (limited to 'Master/texmf-dist/scripts/texdoc/texdoclib-view.tlu')
-rwxr-xr-x | Master/texmf-dist/scripts/texdoc/texdoclib-view.tlu | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Master/texmf-dist/scripts/texdoc/texdoclib-view.tlu b/Master/texmf-dist/scripts/texdoc/texdoclib-view.tlu index 126ca576869..49148ea976b 100755 --- a/Master/texmf-dist/scripts/texdoc/texdoclib-view.tlu +++ b/Master/texmf-dist/scripts/texdoc/texdoclib-view.tlu @@ -32,14 +32,6 @@ local function try_viewing(view_command, viewer_replacement) view_command = view_command .. ' ' .. viewer_replacement end - -- try to catch problems with missing DISPLAY on Unix - if os.type == 'unix' and not (os.name == 'macosx') - and os.getenv('DISPLAY') == nil then - err_print('warning', - 'DISPLAY is not set; your viewer will likely have problems.') - err_print('warning', - 'Try --list to list results instead of displaying them.') - end err_print('info', 'View command: ' .. view_command) -- See long comment below this function for the LC_CTYPE story. @@ -55,6 +47,12 @@ local function try_viewing(view_command, viewer_replacement) -- the big casino: run the external command. if os.execute(view_command) > 0 then err_print('error', 'Failed to execute: ' .. view_command) + -- try to catch problems with missing DISPLAY on Unix + if os.type == 'unix' and not (os.name == 'macosx') + and os.getenv('DISPLAY') == nil then + err_print('error', + 'Maybe your viewer failed because DISPLAY is not set.') + end os.exit(C.exit_error) end |