From 71e534be4153dbb4133cca36df11a8ef3e28aa3c Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Thu, 30 Aug 2012 15:34:17 -0300 Subject: [PATCH] avoid loading the app to test plugin dependencies --- script/noosfero-plugins | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/noosfero-plugins b/script/noosfero-plugins index 9e25cd7..fb9cb68 100755 --- a/script/noosfero-plugins +++ b/script/noosfero-plugins @@ -21,6 +21,8 @@ disabled_plugins=$(printf "%s\n" $available_plugins $enabled_plugins_dir | sort # operation defaults quiet=false needs_migrate=false +load_paths="$NOOSFERO_DIR/lib:$(echo $NOOSFERO_DIR/vendor/plugins/*/lib | tr ' ' :)" + _list() { for plugin in $available_plugins; do @@ -79,7 +81,7 @@ _enable(){ dependencies_ok=true dependencies_file="$source/dependencies.rb" if [ -e "$dependencies_file" ]; then - if ! "$NOOSFERO_DIR"/script/runner "require '$dependencies_file'"; then + if ! ruby -I$load_paths -e "require '$dependencies_file'"; then dependencies_ok=false fi fi -- libgit2 0.21.2