From aee53b0d48e05f732b2fe3cec225e9ab1fba92a3 Mon Sep 17 00:00:00 2001 From: Pierre Rousseau Date: Wed, 4 May 2022 07:24:33 +0000 Subject: [PATCH] [FIX] web: ensure realpath is installed With this commit, if realpath is not available (for exemple on macos), the script is directly stopped. closes odoo/odoo#90522 X-original-commit: 7857c577948d55842a5697ca6d91bb6ea656ef6e Signed-off-by: Samuel Degueldre Signed-off-by: Pierre Rousseau (pro) --- addons/web/tooling/enable.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/web/tooling/enable.sh b/addons/web/tooling/enable.sh index 1e1a2f6abff..a5aba47d531 100755 --- a/addons/web/tooling/enable.sh +++ b/addons/web/tooling/enable.sh @@ -1,6 +1,11 @@ #!/bin/bash community=$(cd -- "$(dirname "$0")" &> /dev/null && cd ../../.. && pwd) tooling="$community/addons/web/tooling" +testRealPath="$(realpath --relative-to=. "$tooling/hooks")" +if [[ $testRealPath == "" ]]; then + echo "Please install realpath" + exit 1 +fi enableInDir () { cd $1