Suffix ||true so pgrep will not croak on lack of processes
Change-Id: I83d03646e54e25c33e73e399a73bdd490cca0fb7
diff --git a/vars/pgrep_port_forward.groovy b/vars/pgrep_port_forward.groovy
index 0862aef..78ce5a7 100644
--- a/vars/pgrep_port_forward.groovy
+++ b/vars/pgrep_port_forward.groovy
@@ -75,7 +75,7 @@
// but logic is prone to exception so (YUCK!) hardcode for now.
script : """
-pgrep --uid \$(uid -u) --list-full --full 'port-forw'
+pgrep --uid \$(uid -u) --list-full --full 'port-forw' || true
""",
)
return(ans)
diff --git a/vars/pkill_port_forward.groovy b/vars/pkill_port_forward.groovy
index 77bf5c4..d935701 100644
--- a/vars/pkill_port_forward.groovy
+++ b/vars/pkill_port_forward.groovy
@@ -80,7 +80,7 @@
sh(
label : 'Display port forwarding (pre-pgrep-pkill)',
script : """
-pgrep --uid \$(id -u) --list-full --full 'port-forw'
+pgrep --uid \$(id -u) --list-full --full 'port-forw' || true
""")
}