Permalink
Browse files

Merge branch 'master' of github.com:sm/sm

  • Loading branch information...
2 parents 4271855 + 2b8929c commit 3c9f280250c5ba3eae2d392884cb16429d3c5da3 @mpapis mpapis committed Aug 27, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 core/internal/shell/extensions/execution/functions
@@ -3,7 +3,7 @@
__sm.extension.actions.type()
{
typeset -g action_type
- typeset _path _path_type extension shebang
+ typeset _path _path_type extension shebang binary
_path="${action_path:-}"
case "${action}" in
@@ -43,7 +43,7 @@ __sm.extension.actions.type()
case "${shebang}" in
*ruby|*rbx|*jruby|*macruby)
- binary="${shebang##*(#|!)}"
+ binary="${shebang##*(\#|!)}"
binary="${binary##* }"
action_type="ruby"
;;
@@ -191,7 +191,10 @@ __sm.extension.run()
requires=()
for script in functions initialize
do
- requires+=( "-r${__sm_modules_path}/ruby/core/${script}.rb" )
+ if [[ -f "${__sm_modules_path}/ruby/core/${script}.rb" ]]
+ then
+ requires+=( "-r${__sm_modules_path}/ruby/core/${script}.rb" )
+ fi
done
exec "${binary:-ruby}" -I"${__sm_modules_path}/ruby" -I"${extension_modules_path}/ruby" \

0 comments on commit 3c9f280

Please sign in to comment.