Skip to content

Commit

Permalink
fix: dont fail validate cmd for local only
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeAbella authored and xixiaofinland committed Oct 1, 2024
1 parent 4a923c7 commit 969ef64
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/sf/sub/cmd_builder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,12 @@ function CommandBuilder:validate()
local required_fields = {
{ field = "command", message = '"command" property not set' },
{ field = "action", message = '"action" property not set' },
{ field = "org", message = "no given org value nor default target_org" },
}

if self.require_org then
table.insert(required_fields, { field = "org", message = "no given org value nor default target_org" })
end

for _, field in ipairs(required_fields) do
if U.is_empty_str(self[field.field]) then
U.notify_then_error("Invalid cmd building: " .. field.message)
Expand Down

0 comments on commit 969ef64

Please sign in to comment.