Skip to content

Commit

Permalink
Fix queryNames() to check also stdout to contain not found message
Browse files Browse the repository at this point in the history
  • Loading branch information
jonesbusy authored and akram committed Oct 10, 2022
1 parent 08c2439 commit 65405fb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,7 @@ class OpenShiftDSL implements Serializable {
r.failIf("Unable to retrieve object names: " + this.toString());
} else {
r = (OcAction.OcActionResult)script._OcAction(buildCommonArgs("get", selectionArgs(), null, "-o=name"));
if (r.status != 0 && r.err.contains("(NotFound)")) {
if (r.status != 0 && (r.err.contains("(NotFound)") || r.out.contains("(NotFound)"))) {
return new ArrayList<String>();
} else {
r.failIf("Unable to retrieve object names: " + this.toString());
Expand Down

0 comments on commit 65405fb

Please sign in to comment.