diff options
author | Karl Berry <karl@freefriends.org> | 2021-03-17 21:45:41 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-03-17 21:45:41 +0000 |
commit | 4e23d975749086e31b6d68aed79e07d1bc0ec39f (patch) | |
tree | 16774293d5b052f35c72d5b6659ae2f12430075d /Master/texmf-dist/scripts/texdoc/texdoclib-view.tlu | |
parent | c0f93dfe2ef3ac57aae4ec69d89970f7915fd177 (diff) |
texdoc (17mar21)
git-svn-id: svn://tug.org/texlive/trunk@58477 c570f23f-e606-0410-a88d-b1316a301751
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 |