scripts: fallback to empty config table if args were not passed from the config files

Fixes #158
This commit is contained in:
George Kiagiadakis 2022-01-13 11:08:34 +02:00
parent 8844cfb074
commit 18bc3d3596
9 changed files with 9 additions and 9 deletions

View File

@ -5,7 +5,7 @@
--
-- SPDX-License-Identifier: MIT
local config = ...
local config = ... or {}
-- preprocess rules and create Interest objects
for _, r in ipairs(config.rules or {}) do

View File

@ -6,7 +6,7 @@
-- SPDX-License-Identifier: MIT
-- Receive script arguments from config.lua
local config = ...
local config = ... or {}
items = {}

View File

@ -8,7 +8,7 @@
--
-- SPDX-License-Identifier: MIT
local config = ...
local config = ... or {}
-- whether to store state on the file system
use_persistent_storage = config["use-persistent-storage"] or false

View File

@ -6,7 +6,7 @@
-- SPDX-License-Identifier: MIT
-- Receive script arguments from config.lua
local config = ...
local config = ... or {}
-- ensure config.properties is not nil
config.properties = config.properties or {}

View File

@ -6,7 +6,7 @@
-- SPDX-License-Identifier: MIT
-- Receive script arguments from config.lua
local config = ...
local config = ... or {}
-- ensure config.properties is not nil
config.properties = config.properties or {}

View File

@ -5,7 +5,7 @@
--
-- SPDX-License-Identifier: MIT
local config = ...
local config = ... or {}
config.roles = config.roles or {}
config["duck.level"] = config["duck.level"] or 0.3

View File

@ -6,7 +6,7 @@
-- SPDX-License-Identifier: MIT
-- Receive script arguments from config.lua
local config = ...
local config = ... or {}
config.roles = config.roles or {}
local self = {}

View File

@ -6,7 +6,7 @@
-- SPDX-License-Identifier: MIT
-- Receive script arguments from config.lua
local config = ...
local config = ... or {}
-- ensure config.move and config.follow are not nil
config.move = config.move or false

View File

@ -6,7 +6,7 @@
-- SPDX-License-Identifier: MIT
-- Receive script arguments from config.lua
local config = ...
local config = ... or {}
-- ensure config.move and config.follow are not nil
config.move = config.move or false