From de5c00ac23a9126c2731dc70e845a728c8ebd5ea Mon Sep 17 00:00:00 2001 From: Apostolis Anastasiou Date: Fri, 20 Jan 2023 03:09:16 +0200 Subject: [PATCH 1/6] Add test to see if command exists with POSIX 'command' --- ci/e2ereport.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ci/e2ereport.sh b/ci/e2ereport.sh index ebf45b912..a787aa354 100755 --- a/ci/e2ereport.sh +++ b/ci/e2ereport.sh @@ -9,7 +9,13 @@ FORCE_COLOR=1 DEBUG=1 go run ./e2etests/report/main.go "$@"; if [ -z "${NO_OPEN:-}" ]; then if [ -s "$REPORT_OUTPUT" ]; then - open "$REPORT_OUTPUT" + if [ -x "$(command -v open)" ]; then + open $REPORT_OUTPUT + elif [ -x "$(command -v xdg-open)" ]; then + xdg-open $REPORT_OUTPUT + else + echo "Please open $REPORT_OUTPUT" + fi else echo "The report is empty" fi From 3cc8ab1cb829d3787f6bfb8b0e0cc3581c885c16 Mon Sep 17 00:00:00 2001 From: Apostolis A Date: Fri, 20 Jan 2023 04:29:47 +0200 Subject: [PATCH 2/6] Update ci/e2ereport.sh Co-authored-by: Anmol Sethi --- ci/e2ereport.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/e2ereport.sh b/ci/e2ereport.sh index a787aa354..0223dc46d 100755 --- a/ci/e2ereport.sh +++ b/ci/e2ereport.sh @@ -9,7 +9,7 @@ FORCE_COLOR=1 DEBUG=1 go run ./e2etests/report/main.go "$@"; if [ -z "${NO_OPEN:-}" ]; then if [ -s "$REPORT_OUTPUT" ]; then - if [ -x "$(command -v open)" ]; then + if command -v open >/dev/null; then open $REPORT_OUTPUT elif [ -x "$(command -v xdg-open)" ]; then xdg-open $REPORT_OUTPUT From ec9617eafe18d52bae58108ac8f835dc97ef8ddb Mon Sep 17 00:00:00 2001 From: Apostolis Anastasiou Date: Sat, 21 Jan 2023 19:02:55 +0200 Subject: [PATCH 3/6] Add redirection of output to /dev/null for xdg-open Signed-off-by: Apostolis Anastasiou --- ci/e2ereport.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/e2ereport.sh b/ci/e2ereport.sh index 0223dc46d..b88260ff9 100755 --- a/ci/e2ereport.sh +++ b/ci/e2ereport.sh @@ -11,7 +11,7 @@ if [ -z "${NO_OPEN:-}" ]; then if [ -s "$REPORT_OUTPUT" ]; then if command -v open >/dev/null; then open $REPORT_OUTPUT - elif [ -x "$(command -v xdg-open)" ]; then + elif [ -x "$(command -v xdg-open >/dev/null)" ]; then xdg-open $REPORT_OUTPUT else echo "Please open $REPORT_OUTPUT" From 4aee9da4331245d32498df285d9da46f0397c155 Mon Sep 17 00:00:00 2001 From: Apostolis A Date: Mon, 23 Jan 2023 03:12:26 +0200 Subject: [PATCH 4/6] Update ci/e2ereport.sh Co-authored-by: Anmol Sethi --- ci/e2ereport.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/e2ereport.sh b/ci/e2ereport.sh index b88260ff9..f27949969 100755 --- a/ci/e2ereport.sh +++ b/ci/e2ereport.sh @@ -11,7 +11,7 @@ if [ -z "${NO_OPEN:-}" ]; then if [ -s "$REPORT_OUTPUT" ]; then if command -v open >/dev/null; then open $REPORT_OUTPUT - elif [ -x "$(command -v xdg-open >/dev/null)" ]; then + elif command -v xdg-open >/dev/null; then xdg-open $REPORT_OUTPUT else echo "Please open $REPORT_OUTPUT" From 97e73cf3fd07b430176026eae7d81d36a7aa42ef Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Thu, 9 Feb 2023 20:09:20 -0800 Subject: [PATCH 5/6] Update ci/e2ereport.sh --- ci/e2ereport.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/e2ereport.sh b/ci/e2ereport.sh index f27949969..8dfe5d6a3 100755 --- a/ci/e2ereport.sh +++ b/ci/e2ereport.sh @@ -10,7 +10,7 @@ FORCE_COLOR=1 DEBUG=1 go run ./e2etests/report/main.go "$@"; if [ -z "${NO_OPEN:-}" ]; then if [ -s "$REPORT_OUTPUT" ]; then if command -v open >/dev/null; then - open $REPORT_OUTPUT + open "$REPORT_OUTPUT" elif command -v xdg-open >/dev/null; then xdg-open $REPORT_OUTPUT else From ecd2ed2be044aee8c60ebfd88e1cb7406df37a89 Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Thu, 9 Feb 2023 20:09:27 -0800 Subject: [PATCH 6/6] Update ci/e2ereport.sh --- ci/e2ereport.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/e2ereport.sh b/ci/e2ereport.sh index 8dfe5d6a3..c92f83e26 100755 --- a/ci/e2ereport.sh +++ b/ci/e2ereport.sh @@ -12,7 +12,7 @@ if [ -z "${NO_OPEN:-}" ]; then if command -v open >/dev/null; then open "$REPORT_OUTPUT" elif command -v xdg-open >/dev/null; then - xdg-open $REPORT_OUTPUT + xdg-open "$REPORT_OUTPUT" else echo "Please open $REPORT_OUTPUT" fi