Skip to content

Commit

Permalink
End 'early' if help/version info requested
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwright committed Mar 6, 2018
1 parent 039c155 commit 1ab7c6e
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions l3build.lua
Expand Up @@ -50,6 +50,17 @@ local function build_require(s)
end
build_require("arguments")
build_require("help")
-- Filter out special cases early
if options["target"] == "help" then
help()
exit(0)
elseif options["target"] == "version" then
version()
exit(0)
end
build_require("file-functions")
build_require("typesetting")
build_require("aux")
Expand All @@ -61,7 +72,6 @@ build_require("unpack")
build_require("manifest")
build_require("manifest-setup")
build_require("tagging")
build_require("help")
build_require("stdmain")
-- Allow main function to be disabled 'higher up'
Expand Down Expand Up @@ -134,13 +144,5 @@ if #checkconfigs == 1 and
end
end
-- Call the main function after filtering special cases
if options["target"] == "help" then
help()
exit(0)
elseif options["target"] == "version" then
version()
exit(0)
end
-- Call the main function
main(options["target"], options["names"])

0 comments on commit 1ab7c6e

Please sign in to comment.