Suggest CLI option when missing a parameter.

This commit is contained in:
Antonin Décimo
2020-10-19 21:40:39 +02:00
parent 91a0fb7875
commit f2b5d8b37c
2 changed files with 6 additions and 6 deletions

View File

@@ -14,23 +14,23 @@ local s = {}
local function validate(project)
local valid, err = true, utils.io.err
if type(project.author) ~= "string" or project.author == "" then
err("DEBIAN: No author specified.\n")
err("DEBIAN: No author specified (--author).\n")
valid = false
end
if type(project.description) ~= "string" or project.description == "" then
err("DEBIAN: No description specified.\n")
err("DEBIAN: No description specified (--desc).\n")
valid = false
end
if type(project.email) ~= "string" or project.email == "" then
err("DEBIAN: No email specified.\n")
err("DEBIAN: No email specified (--email).\n")
valid = false
end
if type(project.homepage) ~= "string" or project.homepage == "" then
err("DEBIAN: No homepage specified.\n")
err("DEBIAN: No homepage specified (--url).\n")
valid = false
end
if type(project.version) ~= "string" or project.version == "" then
err("DEBIAN: No version specified.\n")
err("DEBIAN: No version specified (-v).\n")
valid = false
end
if not valid then os.exit(1) end

View File

@@ -14,7 +14,7 @@ local s = {}
local function validate(project)
local valid, err = true, utils.io.err
if type(project.identifier) ~= "string" or project.identifier == "" then
err("macOS: No identifier specified.\n")
err("macOS: No identifier specified (--uti).\n")
valid = false
end
if not valid then os.exit(1) end