applicationsonline / librarian

Librarian - A Framework for Bundlers. Librarian-Chef is at: https://github.com/applicationsonline/librarian-chef.
http://applicationsonline.com/
MIT License
654 stars 71 forks source link

Librarian-Chef 0.0.24 "fatal: ambiguous argument 'rhel': unknown revision or path not in the working tree." #87

Open miah opened 12 years ago

miah commented 12 years ago

Most of the details are in this gist.

https://gist.github.com/720082b2d3a3f9942cbc

For some reason, Librarian doesn't like my branch name.

Miahs-MacBook-Air:varnish miah$ git branch -la master

yfeldblum commented 12 years ago

Can you run the command again with the flag --verbose and gist the output?

miah commented 12 years ago

I updated the gist with a comment that contains the verbose output.

yfeldblum commented 12 years ago

This is the log line I noticed:

[Librarian] Running /usr/bin/git rev-list rhel -1 in <cache-path>

The log line should actually be:

[Librarian] Running /usr/bin/git rev-list origin/rhel -1 in <cache-path>

Hmm.

dergachev commented 11 years ago

I googled a similar error and landed on this page. However in my case, I had simply forgotten to push the new branch I was referring to in my Cheffile, and this is the error librarian-chef produced.

[Librarian] Running `/usr/bin/git rev-list origin/AD-Existing -1` in tmp/librarian/cache/source/git/e44f8432aefe70b5
/Users/dergachev/.rvm/gems/ruby-2.0.0-p0/gems/librarian-0.1.0/lib/librarian/source/git/repository.rb:209:in `run_command_internal': fatal: ambiguous argument 'origin/AD-Existing': unknown revision or path not in the working tree. (StandardError)
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

Thanks to this issue, I ran librarian-chef install --verbose and was able to easily spot the problem by manually running the failing git command, which was:

cd tmp/librarian/cache/source/git/e44f8432aefe70b5
/usr/bin/git rev-list origin/AD-Existing -1