From 68f5464a8831225ed18e1752a0c0801307e823ba Mon Sep 17 00:00:00 2001 From: Jacob Wolfe Date: Wed, 16 Apr 2025 09:56:19 -0500 Subject: [PATCH] Fix: Stop sudo -E from overwriting HOME environment variable (#138) `sudo -E` was replacing `appuser`'s `$HOME` environment variable of `/app` with `/root` causing permission issues when selenium tried to write to `~/.cache/selenium`. This fixes [issue #130](https://github.com/calibrain/calibre-web-automated-book-downloader/issues/130) by allowing Driver from seleniumbase to successfully return instead of timing out on line 172 in `cloudflare_bypasser.py`. --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 6b2c5030..c9e82fe3 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -126,4 +126,4 @@ echo "Running command: '$command' as '$USERNAME' in '$APP_ENV' mode" exec 1>&3 2>&4 exec 3>&- 4>&- -exec sudo -E -u "$USERNAME" $command +exec sudo -E -u "$USERNAME" HOME=/app $command