Browse files

Only add existing files to the ruby requires

This is a guard to not add to the list files that don't exist.
When sm is installed for the root user, those files are


They look like core sm files: this fix is not the definitive one.
Are these files located elsewhere?
Should this block of code be entirely removed?
  • Loading branch information...
1 parent 7245170 commit 0d308eccbf9181d9fdea6c11f61adc68ac37d825 hmalphettes committed Aug 23, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 core/internal/shell/extensions/execution/functions
@@ -191,7 +191,10 @@
for script in functions initialize
- 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
exec "${binary:-ruby}" -I"${__sm_modules_path}/ruby" -I"${extension_modules_path}/ruby" \

0 comments on commit 0d308ec

Please sign in to comment.