Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ensure we declare the variable keys before they are assigned within i…

…ni load.
  • Loading branch information...
commit 5b65a35c9c0fdec89cea9bd417b6f62424f05ec0 1 parent f8a320a
@wayneeseguin wayneeseguin authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 core/internal/shell/ini/functions
View
12 core/internal/shell/ini/functions
@@ -15,6 +15,16 @@ __sm.ini.parse() {
}
__sm.ini.load() {
- eval "$(__sm.ini.parse "${1}")"
+ local _content _keys
+
+ _content=$(__sm.ini.parse "${1}")
+
+ _keys=($( echo ${_content} | sed -e 's/=[^;]*//g' -e 's/;//g'))
+
+ for _key in ${_keys[@]}
+ do typeset -g ${_key}
+ done
+
+ eval "${_content}"
}
Please sign in to comment.
Something went wrong with that request. Please try again.