summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2023-12-11 19:35:09 +0100
committerErich Eckner <git@eckner.net>2023-12-11 19:35:09 +0100
commitfb296b99f2313593d3aa3660f1ff44d59f057d10 (patch)
tree41b7a3cfdcde74c13a99f4aa27aa37dff55c8b66
parent1e167de3fb62d8c4bd2c8f9c6bea5cd10a5df56c (diff)
downloadMilchtankstelle-fb296b99f2313593d3aa3660f1ff44d59f057d10.tar.xz
run-test.sh: run from different user which has a keyless signing key
-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