diff --git a/util/tup-ext.lua b/util/tup-ext.lua index 9f04ed31..15de3f6d 100644 --- a/util/tup-ext.lua +++ b/util/tup-ext.lua @@ -21,6 +21,16 @@ function iglob(pats) return iter(glob(pats)) end +-- getconfig returning an empty string on absence is inconvenient +function getconfig(str) + local v = tup.getconfig(str) + if v == "" then + return nil + else + return v + end +end + function symlink(input, output) -- The path must be relative from output, walk back to the root local prefix = ""