diff --git a/salt/common/tools/sbin/so-common b/salt/common/tools/sbin/so-common index fcd9c08f2..66c91aa7b 100755 --- a/salt/common/tools/sbin/so-common +++ b/salt/common/tools/sbin/so-common @@ -311,12 +311,19 @@ retry() { if [[ "$output" =~ "$expectedOutput" ]]; then return $exitcode else - echo "Expected '$expectedOutput' but got '$output'" + echo "Did not find expectedOutput: '$expectedOutput' in the output below from running the command: '$cmd'" + echo "" + echo "$output" + echo "" fi elif [ -n "$failedOutput" ]; then if [[ "$output" =~ "$failedOutput" ]]; then - echo "Found failed output '$failedOutput' in '$output'. Setting exitcode to 1." + echo "Found failedOutput: '$failedOutput' in the output below from running the command: '$cmd'" + echo "" + echo "$output" + echo "" if [[ $exitcode -eq 0 ]]; then + echo "The exitcode was 0, but we are setting to 1 since we found $failedOutput in the output." exitcode=1 fi else