Commit 71e534be4153dbb4133cca36df11a8ef3e28aa3c
1 parent
2d571067
Exists in
master
and in
28 other branches
avoid loading the app to test plugin dependencies
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
script/noosfero-plugins
... | ... | @@ -21,6 +21,8 @@ disabled_plugins=$(printf "%s\n" $available_plugins $enabled_plugins_dir | sort |
21 | 21 | # operation defaults |
22 | 22 | quiet=false |
23 | 23 | needs_migrate=false |
24 | +load_paths="$NOOSFERO_DIR/lib:$(echo $NOOSFERO_DIR/vendor/plugins/*/lib | tr ' ' :)" | |
25 | + | |
24 | 26 | |
25 | 27 | _list() { |
26 | 28 | for plugin in $available_plugins; do |
... | ... | @@ -79,7 +81,7 @@ _enable(){ |
79 | 81 | dependencies_ok=true |
80 | 82 | dependencies_file="$source/dependencies.rb" |
81 | 83 | if [ -e "$dependencies_file" ]; then |
82 | - if ! "$NOOSFERO_DIR"/script/runner "require '$dependencies_file'"; then | |
84 | + if ! ruby -I$load_paths -e "require '$dependencies_file'"; then | |
83 | 85 | dependencies_ok=false |
84 | 86 | fi |
85 | 87 | fi | ... | ... |