From a111161ec4ddd8ed822641d2106823c452bafd76 Mon Sep 17 00:00:00 2001 From: Leo Davis Date: Thu, 30 Jan 2020 18:55:38 -0700 Subject: [PATCH] validate is broken if salt is not installed. --- pepper/script.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pepper/script.py b/pepper/script.py index 21afe63..a86e927 100755 --- a/pepper/script.py +++ b/pepper/script.py @@ -113,6 +113,12 @@ def __call__(self): print(result, file=ofile) else: print(result) + # prepare for validate now + result = json.loads(result) + + # unwrap ret in some cases + if 'return' in result: + result = result['return'] if exit_code is not None: if exit_code == 0: return PepperRetcode().validate(self.cli.options, result)