Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

librarian-puppet install --verbose fails if there is no git installed #56

Open
func0der opened this issue Nov 22, 2017 · 0 comments
Open

Comments

@func0der
Copy link

Ran: > librarian-puppet install --verbose

Got:

default: [Librarian] Ruby Version: 2.3.3
    default: [Librarian] Ruby Platform: x86_64-linux-gnu
    default: [Librarian] Rubygems Version: 2.5.2.1
    default: [Librarian] Librarian Version: 0.6.4
    default: [Librarian] Librarian Adapter: puppet
    default: [Librarian] Librarian Adapter Version: 2.2.3
    default: [Librarian] Project: /vagrant
    default: [Librarian] Specfile: Puppetfile
    default: [Librarian] Lockfile: Puppetfile.lock
    default: cannot find git
    default: /var/lib/gems/2.3.0/gems/librarianp-0.6.4/lib/librarian/posix.rb:29:in `which!'
    default: /var/lib/gems/2.3.0/gems/librarianp-0.6.4/lib/librarian/source/git/repository.rb:20:in `bin'
    default: /var/lib/gems/2.3.0/gems/librarianp-0.6.4/lib/librarian/cli.rb:192:in `block in write_debug_header'
    default: /var/lib/gems/2.3.0/gems/librarianp-0.6.4/lib/librarian/logger.rb:37:in `block in debug'
    default: /var/lib/gems/2.3.0/gems/librarianp-0.6.4/lib/librarian/ui.rb:32:in `debug'
    default: /var/lib/gems/2.3.0/gems/librarianp-0.6.4/lib/librarian/logger.rb:37:in `debug'
    default: /var/lib/gems/2.3.0/gems/librarian-puppet-2.2.3/lib/librarian/puppet/util.rb:9:in `debug'
    default: /var/lib/gems/2.3.0/gems/librarianp-0.6.4/lib/librarian/cli.rb:192:in `write_debug_header'
    default: /var/lib/gems/2.3.0/gems/librarianp-0.6.4/lib/librarian/cli.rb:61:in `initialize'
    default: /var/lib/gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:383:in `new'
    default: /var/lib/gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:383:in `dispatch'
    default: /var/lib/gems/2.3.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
    default: /var/lib/gems/2.3.0/gems/librarianp-0.6.4/lib/librarian/cli.rb:26:in `block (2 levels) in bin!'
    default: /var/lib/gems/2.3.0/gems/librarianp-0.6.4/lib/librarian/cli.rb:31:in `returning_status'
    default: /var/lib/gems/2.3.0/gems/librarianp-0.6.4/lib/librarian/cli.rb:26:in `block in bin!'
    default: /var/lib/gems/2.3.0/gems/librarianp-0.6.4/lib/librarian/cli.rb:47:in `with_environment'
    default: /var/lib/gems/2.3.0/gems/librarianp-0.6.4/lib/librarian/cli.rb:26:in `bin!'
    default: /var/lib/gems/2.3.0/gems/librarian-puppet-2.2.3/bin/librarian-puppet:7:in `<top (required)>'
    default: /usr/local/bin/librarian-puppet:22:in `load'
    default: /usr/local/bin/librarian-puppet:22:in `<main>'

Seems: wrong.

Works with: librarian-puppet install.

Reason: Probably because you want to give information about the installed git environment in the verbose output.

Expected output: Do not require git to be actually installed until it is really needed.
Just show Not installed as the git environment state in the verbose output.

The script should only fail if git is really needed, in other words, if a module with a git background is defined in the Puppetfile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant