From 3656c37827c05c7a737b723825c139eb1ad88963 Mon Sep 17 00:00:00 2001 From: James Tanner Date: Tue, 12 Nov 2013 10:37:27 -0500 Subject: [PATCH] Addresses #4628 evaluate package check return properly and exit failure if not present --- packaging/pkgng | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/pkgng b/packaging/pkgng index dbae01bbb16..b8221a999d1 100644 --- a/packaging/pkgng +++ b/packaging/pkgng @@ -123,8 +123,8 @@ def install_packages(module, pkgin_path, packages, cached, pkgsite): if not module.check_mode: rc, out, err = module.run_command("%s %s install -U -y %s" % (pkgsite, pkgin_path, package)) - if not module.check_mode and query_package(module, pkgin_path, package): - module.fail_json(msg="failed to install %s: %s" % (package, out)) + if not module.check_mode and not query_package(module, pkgin_path, package): + module.fail_json(msg="failed to install %s: %s" % (package, out), stderr=err) install_c += 1