loader: attach ini file to singleton projects
authorJean Privat <jean@pryen.org>
Tue, 25 Aug 2015 20:12:09 +0000 (16:12 -0400)
committerJean Privat <jean@pryen.org>
Thu, 27 Aug 2015 17:38:27 +0000 (13:38 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/loader.nit

index 0723cad..56d0164 100644 (file)
@@ -353,6 +353,13 @@ redef class ModelBuilder
                        mgroup.filepath = path
                        mproject.root = mgroup
                        toolcontext.info("found singleton project `{pn}` at {path}", 2)
+
+                       # Attach homonymous `ini` file to the project
+                       var inipath = path.dirname / "{pn}.ini"
+                       if inipath.file_exists then
+                               var ini = new ConfigTree(inipath)
+                               mproject.ini = ini
+                       end
                end
 
                var res = new ModulePath(pn, path, mgroup)