diff options
author | Erich Eckner <git@eckner.net> | 2023-12-11 19:35:09 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2023-12-11 19:35:09 +0100 |
commit | fb296b99f2313593d3aa3660f1ff44d59f057d10 (patch) | |
tree | 41b7a3cfdcde74c13a99f4aa27aa37dff55c8b66 | |
parent | 1e167de3fb62d8c4bd2c8f9c6bea5cd10a5df56c (diff) | |
download | Milchtankstelle-fb296b99f2313593d3aa3660f1ff44d59f057d10.tar.xz |
run-test.sh: run from different user which has a keyless signing key
-rwxr-xr-x | run-test.sh | 22 |
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 |