From fe3015ebbd5a540f5e4f1b9b364672f444842023 Mon Sep 17 00:00:00 2001
From: Guillaume Pasero <guillaume.pasero@c-s.fr>
Date: Wed, 7 Aug 2019 10:17:07 +0200
Subject: [PATCH] BUG: fix parameter expansion in otbenv

---
 Packaging/Files/otbenv.bash    | 2 +-
 Packaging/Files/otbenv.profile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Packaging/Files/otbenv.bash b/Packaging/Files/otbenv.bash
index f2f56b4822..a2a7906ca4 100644
--- a/Packaging/Files/otbenv.bash
+++ b/Packaging/Files/otbenv.bash
@@ -24,7 +24,7 @@ cat_path()
   if [ $# -eq 1 ]; then echo "$1"; exit 0; fi
   cur="$1"
   shift 1
-  next="$(cat_path $@)"
+  next=$(cat_path "$@")
   if [ -z "$cur" ]; then
     echo "$next"
   elif [ -z "$next" ]; then
diff --git a/Packaging/Files/otbenv.profile b/Packaging/Files/otbenv.profile
index c98c77a451..f46ab79bf7 100644
--- a/Packaging/Files/otbenv.profile
+++ b/Packaging/Files/otbenv.profile
@@ -25,7 +25,7 @@ cat_path()
   if [ $# -eq 1 ]; then echo "$1"; exit 0; fi
   cur="$1"
   shift 1
-  next="$(cat_path $@)"
+  next=$(cat_path "$@")
   if [ -z "$cur" ]; then
     echo "$next"
   elif [ -z "$next" ]; then
-- 
GitLab