diff --git a/core/internal/shell/extensions/execution/functions b/core/internal/shell/extensions/execution/functions index 9f64a85d..8e896f77 100644 --- a/core/internal/shell/extensions/execution/functions +++ b/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" \