Closed afex closed 9 years ago
I just found this error and fixed it in librarian-puppet by exposing the specfile variable https://github.com/rodjek/librarian-puppet/blob/947974f52047086541f9eb4e22d9560203013b1b/lib/librarian/puppet/dsl.rb#L36
I can provide a PR if that solution looks good
When you have a nested dependency containing its own specfile, the file is eval'd using the process's current directory instead of the directory of the specfile. This causes file reads which are done relative to the specfile to run in the wrong directory.
Specifically: a librarian-puppet project having a git dependency which also contains a Puppetfile in its root. This Puppetfile uses the
modulefile
dsl, causing aFile.read('Modulefile')
in the current directory. This read needs to happen in the appropriate subfolder in.tmp/librarian/cache
.