summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrun-test.sh22
1 files changed, 9 insertions, 13 deletions
diff --git a/run-test.sh b/run-test.sh
index 2bea55b..7d4ed0d 100755
--- a/run-test.sh
+++ b/run-test.sh
@@ -2,18 +2,14 @@
cd "$(dirname "$(readlink -e "$0")")"
-if ! cnt=$(
- npx playwright test
-); then
- {
- printf '%s\n' \
- 'To: erich@eckner.net' \
- 'From: erich@'"$(hostname)" \
- 'Subject: playwright' \
- '' \
- 'Die Milchtankstelle geht wieder:' \
- '' \
- "${cnt}"
- } \
+if ! cnt=$(su erich -c "npx playwright test"); then
+ printf '%s\n' \
+ 'To: erich@eckner.net' \
+ 'From: erich@'"$(hostname)" \
+ 'Subject: playwright' \
+ '' \
+ 'Die Milchtankstelle geht wieder:' \
+ '' \
+ "${cnt}" \
| sendmailadvanced -t
fi