aboutsummaryrefslogtreecommitdiff
path: root/src/lpm.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/lpm.lua')
-rw-r--r--src/lpm.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index d875cdf..16c20f0 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -1440,8 +1440,8 @@ local function parse_arguments(arguments, options)
if flag_type == "flag" then
args[option] = true
elseif flag_type == "string" or flag_type == "number" then
- if not value then
- if i < #arguments then error("option " .. option .. " requires a " .. flag_type) end
+ if not value or value == "" then
+ if i == #arguments then error("option " .. option .. " requires a " .. flag_type) end
value = arguments[i+1]
i = i + 1
end