diff --git a/setup/scripts/l3d b/setup/scripts/l3d
index 049b565d35ced31d9eed5790893e1983ba4dc28a..dc818f69d35d7eee05fc4867b4ebc34b468ce4fb 100755
--- a/setup/scripts/l3d
+++ b/setup/scripts/l3d
@@ -32,6 +32,7 @@ if [[ ! -n ${ID} ]]; then
 fi
 if [[ -n ${L3DSHELL} ]]; then
   # Nothing to do, we go with this value
+  L3DSHELL=${L3DSHELL}
 elif [[ -n ${SHELL} ]]; then
   L3DSHELL=${SHELL}
 else