fix package
This commit is contained in:
@@ -65,9 +65,10 @@ package.load_config = function(name)
|
||||
|
||||
// Validate: if content has [compilation] but decode result doesn't, retry
|
||||
var has_compilation = search(content, '[compilation') != null
|
||||
var retry = 0
|
||||
var cf = null
|
||||
if (has_compilation && !result.compilation) {
|
||||
print(`TOML decode missing compilation for ${config_path}, retrying`)
|
||||
var retry = 0
|
||||
while (retry < 3 && (!result || !result.compilation)) {
|
||||
result = toml.decode(content)
|
||||
retry = retry + 1
|
||||
@@ -76,7 +77,7 @@ package.load_config = function(name)
|
||||
}
|
||||
|
||||
if (has_compilation && result.compilation) {
|
||||
var cf = result.compilation.CFLAGS
|
||||
cf = result.compilation.CFLAGS
|
||||
if (cf == null && search(content, 'CFLAGS') != null) {
|
||||
print(`TOML has CFLAGS text but decode missing it for ${config_path}`)
|
||||
print(`compilation keys: ${text(array(result.compilation), ',')}`)
|
||||
|
||||
Reference in New Issue
Block a user