git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #99115 from Infinisil/toString-module-files

lib/modules: Make sure to not import module _file's into the store

commite08182020c93ede9e014b3177cd35e5c4b9dc65b authorSilvan Mosberger <contact@infinisil.com> dateMon 30 Nov 2020, 21:00 (6 years ago) parent881dee5769eac0
1 file changed+2−2
lib/modules.nix+2−2
lib/modules.nix+2−2
@@ -265,7 +265,7 @@ rec {
265265 if badAttrs != {} then
266266 throw "Module `${key}' has an unsupported attribute `${head (attrNames badAttrs)}'. This is caused by introducing a top-level `config' or `options' attribute. Add configuration attributes immediately on the top level instead, or move all of them (namely: ${toString (attrNames badAttrs)}) into the explicit `config' attribute."
267267 else
268− { _file = m._file or file;
268+ { _file = toString m._file or file;
269269 key = toString m.key or key;
270270 disabledModules = m.disabledModules or [];
271271 imports = m.imports or [];
@@ -273,7 +273,7 @@ rec {
273273 config = addFreeformType (addMeta (m.config or {}));
274274 }
275275 else
276− { _file = m._file or file;
276+ { _file = toString m._file or file;
277277 key = toString m.key or key;
278278 disabledModules = m.disabledModules or [];
279279 imports = m.require or [] ++ m.imports or [];