Skip to content

Commit

Permalink
Fix boolean CLI arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Derpius committed Dec 3, 2023
1 parent 950f320 commit 37d6bfe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/lest/src/lua/utils/cliParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ local function matchOption(arg)
for _, pattern in ipairs(OPTION_PATTERNS) do
local key, value = string.match(arg, pattern)
if key then
return key, value or true
return key, value or "true"
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions packages/lest/src/lua/utils/configLoader.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
local parseCliOptions = require("src.lua.utils.cliParser")

---@class ConfigProperty
---@field cliOnly? boolean
---@field default? any
---@field default any
---@field type type
---@field cliOnly? boolean

local CLI_ARGUMENT_CASTS_BY_TYPE = {
number = tonumber,
Expand Down

0 comments on commit 37d6bfe

Please sign in to comment.