Commit 71e534be4153dbb4133cca36df11a8ef3e28aa3c
1 parent
2d571067
Exists in
staging
and in
42 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,6 +21,8 @@ disabled_plugins=$(printf "%s\n" $available_plugins $enabled_plugins_dir | sort | ||
21 | # operation defaults | 21 | # operation defaults |
22 | quiet=false | 22 | quiet=false |
23 | needs_migrate=false | 23 | needs_migrate=false |
24 | +load_paths="$NOOSFERO_DIR/lib:$(echo $NOOSFERO_DIR/vendor/plugins/*/lib | tr ' ' :)" | ||
25 | + | ||
24 | 26 | ||
25 | _list() { | 27 | _list() { |
26 | for plugin in $available_plugins; do | 28 | for plugin in $available_plugins; do |
@@ -79,7 +81,7 @@ _enable(){ | @@ -79,7 +81,7 @@ _enable(){ | ||
79 | dependencies_ok=true | 81 | dependencies_ok=true |
80 | dependencies_file="$source/dependencies.rb" | 82 | dependencies_file="$source/dependencies.rb" |
81 | if [ -e "$dependencies_file" ]; then | 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 | dependencies_ok=false | 85 | dependencies_ok=false |
84 | fi | 86 | fi |
85 | fi | 87 | fi |