[DRE-commits] [librarian-puppet] 119/153: Handle error if puppet executable is missing
Stig Sandbeck Mathisen
ssm at debian.org
Wed Jun 1 20:30:54 UTC 2016
This is an automated email from the git hooks/post-receive script.
ssm pushed a commit to branch master
in repository librarian-puppet.
commit 5e0168c6e7b21a3cfc08952ec3fcb7dbf7232493
Author: Carlos Sanchez <carlos at apache.org>
Date: Thu May 21 17:49:06 2015 +0200
Handle error if puppet executable is missing
---
lib/librarian/puppet.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librarian/puppet.rb b/lib/librarian/puppet.rb
index 03a2e1f..2288603 100644
--- a/lib/librarian/puppet.rb
+++ b/lib/librarian/puppet.rb
@@ -17,9 +17,9 @@ module Librarian
begin
@@puppet_version = Librarian::Posix.run!(%W{puppet --version}).strip
- rescue Librarian::Posix::CommandFailure => error
+ rescue Errno::ENOENT, Librarian::Posix::CommandFailure => error
msg = "Unable to load puppet. Please install it using native packages for your platform (eg .deb, .rpm, .dmg, etc)."
- msg += "\npuppet --version returned #{error.status}"
+ msg += "\npuppet --version returned #{error.status}" if error.respond_to? :status
msg += "\n#{error.message}" unless error.message.nil?
$stderr.puts msg
exit 1
--
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