Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed issue of templates install with variables from

  • Loading branch information...
commit 6d782645e94fb3f67650c971ec8b7a3bde22a420 1 parent cf311e1
@longnguyen11288 longnguyen11288 authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 core/internal/shell/templates/functions
View
7 core/internal/shell/templates/functions
@@ -85,19 +85,20 @@ __sm.templates.install()
(( _append == 0 )) || _params+=(--append)
+ _data_string+=""
+
if [[ -n "${_variable}" ]]
then eval "
for (( _index=1 ; _index <= \${#${_variable}} ; _index = _index + 2 ))
- do _params+=( --data \"\${${_variable}[\${_index}]}=\${${_variable}[\$((_index+1))]}\" )
+ do _data_string+=\"\${${_variable}[\${_index}]}=\${${_variable}[\$((_index+1))]}:~\"
done"
fi
- _data_string+="--data \""
for (( _index=1 ; _index <= ${#_data} ; _index = _index + 2 ))
do _data_string+="${_data[${_index}]}=${_data[$((_index+1))]}:~"
done
- _params+=(" ${_data_string}\"" )
+ _params+=( --data "${_data_string}\"" )
if ! "${sm_path}/bin/sm-mustache" "${_params[@]}"
then log error "There was an error rendering the template!"
Please sign in to comment.
Something went wrong with that request. Please try again.