From df4a16ce3fe2d7fa3f5694afe70f9318df1205fd Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Fri, 18 Nov 2016 15:18:15 +0100 Subject: [PATCH] [FIX] Odoo 8.0-10.0: handling of odoo subcommand When using an Odoo subcommand, the name of this subcommand has to be in first position in the arguments list. Just pass the postgres config at the end of the command... except for the scaffold one. Fixes #83 --- 10.0/entrypoint.sh | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/10.0/entrypoint.sh b/10.0/entrypoint.sh index 576a165..4f0ef59 100755 --- a/10.0/entrypoint.sh +++ b/10.0/entrypoint.sh @@ -24,15 +24,19 @@ check_config "db_user" "$USER" check_config "db_password" "$PASSWORD" case "$1" in - -- | odoo) - shift - exec odoo "${DB_ARGS[@]}" "$@" - ;; - -*) - exec odoo "${DB_ARGS[@]}" "$@" - ;; - *) - exec "$@" + -- | odoo) + shift + if [[ "$1" == "scaffold" ]] ; then + exec odoo "$@" + else + exec odoo "$@" "${DB_ARGS[@]}" + fi + ;; + -*) + exec odoo "$@" "${DB_ARGS[@]}" + ;; + *) + exec "$@" esac exit 1