Install languages after loading env file

This fix an issue with undefined PAPERLESS_OCR_LANGUAGES if set in env file
This commit is contained in:
Benoit Anastay 2023-10-04 15:42:50 +02:00 committed by GitHub
parent 71bf8eb332
commit 2006a5e9b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,6 +71,11 @@ initialize() {
# shellcheck disable=SC1091 # shellcheck disable=SC1091
source /sbin/env-from-file.sh source /sbin/env-from-file.sh
# Install additional languages if specified
if [[ -n "$PAPERLESS_OCR_LANGUAGES" ]]; then
install_languages "$PAPERLESS_OCR_LANGUAGES"
fi
# Change the user and group IDs if needed # Change the user and group IDs if needed
map_uidgid map_uidgid
@ -152,11 +157,6 @@ if [ "$(id -u)" == "$(id -u paperless)" ]; then
gosu_cmd=() gosu_cmd=()
fi fi
# Install additional languages if specified
if [[ -n "$PAPERLESS_OCR_LANGUAGES" ]]; then
install_languages "$PAPERLESS_OCR_LANGUAGES"
fi
initialize initialize
if [[ "$1" != "/"* ]]; then if [[ "$1" != "/"* ]]; then