[texdoc-commits] [SCM] texdoc updated: r20 - in trunk: script tools
takuto at gnu.org.ua
takuto at gnu.org.ua
Wed Nov 8 18:22:46 CET 2017
Author: takuto
Date: 2017-11-08 19:22:46 +0200 (Wed, 08 Nov 2017)
New Revision: 20
Modified:
trunk/script/main.tlu
trunk/tools/basic-checks
Log:
check the existence of argument before "view" action
Modified: trunk/script/main.tlu
===================================================================
--- trunk/script/main.tlu 2017-11-06 00:03:14 UTC (rev 19)
+++ trunk/script/main.tlu 2017-11-08 17:22:46 UTC (rev 20)
@@ -36,6 +36,10 @@
texdoc.show_config_files(print, true)
os.exit(exit_ok)
elseif action == 'view' then
+ if not arg[1] then
+ texdoc.print_usage()
+ os.exit(exit_usage)
+ end
local ok = texdoc.view_file(arg[1])
os.exit(ok and exit_ok or exit_error)
end
Modified: trunk/tools/basic-checks
===================================================================
--- trunk/tools/basic-checks 2017-11-06 00:03:14 UTC (rev 19)
+++ trunk/tools/basic-checks 2017-11-08 17:22:46 UTC (rev 20)
@@ -22,6 +22,7 @@
'' => 2,
'-l' => 2,
'--foobar baz' => 2,
+ '--just-view' => 2,
'-V' => 0,
'--version' => 0,
'-h' => 0,
More information about the texdoc-commits
mailing list