From 3959c1f4b041e52522285989464dd4d5b5412b29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= Date: Sat, 28 Jan 2023 22:48:39 -0500 Subject: [PATCH] Remove usage of `env` from Makefile rules One of the benefits here of setting `SHELL := bash` is that we no longer need to use env to set environment variables before a shell command. Bash just handles that itself. Removed a useless use of `cat`. Dropped the `-e` from `bash -ex` as that is handled in ./openqa-label-known-issues-multi itsef. I'm not completely sure about that `grep -v` but it seem like it was trying to avoid the error from invalid JSON (noted in the comment). Putting `-` prefix on a rule command tells `make` not to stop if the command fails. Not sure that is correct here or not. --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index e7da057e..8d88aa7f 100644 --- a/Makefile +++ b/Makefile @@ -28,10 +28,10 @@ test-python: py.test tests) test-online: - cat ./tests/incompletes | env dry_run=1 bash -ex ./openqa-label-known-issues-multi - env dry_run=1 ./trigger-openqa_in_openqa + dry_run=1 bash -x ./openqa-label-known-issues-multi < ./tests/incompletes + dry_run=1 ./trigger-openqa_in_openqa # Invalid JSON causes the job to abort with an error - env tw_openqa_host=example.com dry_run=1 ./trigger-openqa_in_openqa | grep -v 'parse error:' + -tw_openqa_host=example.com dry_run=1 ./trigger-openqa_in_openqa checkstyle: test-shellcheck test-yaml