[DRE-commits] [librarian-puppet] 92/97: Issue #178 Print a meaningful message if puppet gem can't be loaded for :git sources
Stig Sandbeck Mathisen
ssm at debian.org
Tue Mar 11 12:12:53 UTC 2014
This is an automated email from the git hooks/post-receive script.
ssm pushed a commit to branch master
in repository librarian-puppet.
commit 61b6f571ac6b8c6c6ec3dc4428cfd7810d89bc42
Author: Carlos Sanchez <csanchez at maestrodev.com>
Date: Tue Feb 11 19:06:30 2014 +0100
Issue #178 Print a meaningful message if puppet gem can't be loaded for :git sources
---
lib/librarian/puppet/source/git.rb | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/lib/librarian/puppet/source/git.rb b/lib/librarian/puppet/source/git.rb
index c2dea3a..430f5c5 100644
--- a/lib/librarian/puppet/source/git.rb
+++ b/lib/librarian/puppet/source/git.rb
@@ -1,6 +1,15 @@
require 'librarian/source/git'
require 'librarian/puppet/source/local'
-require 'puppet'
+begin
+ require 'puppet'
+rescue LoadError
+ $stderr.puts <<-EOF
+Unable to load puppet, the puppet gem is required for :git source.
+Install it with: gem install puppet
+EOF
+ exit 1
+end
+
module Librarian
module Source
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/librarian-puppet.git
More information about the Pkg-ruby-extras-commits
mailing list