fix: fail fast on malformed custom module YAML
User customizations must be valid - silent skip hides broken configs.
This commit is contained in:
parent
6718475f16
commit
09538099d7
|
|
@ -391,8 +391,8 @@ class ModuleManager {
|
||||||
if (config.code === moduleName) {
|
if (config.code === moduleName) {
|
||||||
return modulePath;
|
return modulePath;
|
||||||
}
|
}
|
||||||
} catch {
|
} catch (error) {
|
||||||
// Skip if can't read config
|
throw new Error(`Failed to parse module.yaml at ${configPath}: ${error.message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -636,8 +636,8 @@ class UI {
|
||||||
moduleData = yaml.load(yamlContent);
|
moduleData = yaml.load(yamlContent);
|
||||||
foundPath = configPath;
|
foundPath = configPath;
|
||||||
break;
|
break;
|
||||||
} catch {
|
} catch (error) {
|
||||||
// Continue to next path
|
throw new Error(`Failed to parse config at ${configPath}: ${error.message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue