File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -534,6 +534,24 @@ psm::tools::run_verbose() {
534
534
return ${exit_code}
535
535
}
536
536
537
+ # ######################################
538
+ # Run command end report its exit code. Doesn't exit on non-zero exit code.
539
+ # Globals:
540
+ # None
541
+ # Arguments:
542
+ # Command to execute
543
+ # Outputs:
544
+ # Writes the output of given command to stdout, stderr
545
+ # ######################################
546
+ psm::tools::run_ignore_exit_code () {
547
+ local exit_code=0
548
+ " $@ " || exit_code=$?
549
+
550
+ if (( exit_code == 0 )) ; then
551
+ psm::tools::log " Cmd failed with exit code ${exit_code} : $* "
552
+ fi
553
+ }
554
+
537
555
psm::tools::log () {
538
556
echo -en " + $( date " +[%H:%M:%S %Z]" ) \011 "
539
557
echo " $@ "
@@ -624,6 +642,10 @@ activate_secondary_gke_cluster() {
624
642
625
643
# ######################################
626
644
# Run command end report its exit code. Doesn't exit on non-zero exit code.
645
+ #
646
+ # Deprecated. Use psm::tools::run_ignore_exit_code
647
+ # TODO(sergiitk): delete this method when no longer used in per-language buildscripts.
648
+ #
627
649
# Globals:
628
650
# None
629
651
# Arguments:
You can’t perform that action at this time.
0 commit comments