зеркало из https://github.com/mozilla/labs-vcap.git
[dev_setup] Clear bundler config
This change clears all bundler remembered settings before attempting an installation. Probably due to the huge repository size, a lot of users try copying their repos around, despite the recommended best practice of only copying the bare repo. This change should solve the problem of a conflict between the dev / test group of gems and production gems for components, say the Cloud Controller. The installer now prompts the user before purging those .bundle directories, or if you want to run non-interactively, pass --all or -a to it. Change-Id: I04b6b9ad462546b51ab1ee11e7e8de91263372bd
This commit is contained in:
Родитель
7c2b382887
Коммит
f539791a32
|
@ -84,6 +84,16 @@ function run_cmd () {
|
|||
fi
|
||||
}
|
||||
|
||||
function clear_bundler_settings () {
|
||||
# Do we have a Bundler problem?
|
||||
find $CLOUDFOUNDRY_HOME/vcap -type d -name .bundle | grep -Fq .bundle || return 0
|
||||
if [ "$ALL" != true ]; then
|
||||
read -p "Remembered Bundler options could cause you troubles, do you want me to clear them for you? [Y/n]"
|
||||
[[ $REPLY =~ ^[nN] ]] && return 0
|
||||
fi
|
||||
(cd $CLOUDFOUNDRY_HOME/vcap && rake bundler:reset || find -type d -name .bundle -prune -exec rm -r {} \; )
|
||||
}
|
||||
|
||||
# Check if we have access to the web
|
||||
run_cmd apt-get $APT_CONFIG install -qym wget
|
||||
if [ $? -ne 0 ]; then
|
||||
|
@ -118,6 +128,8 @@ if [ ! -d $CLOUDFOUNDRY_HOME/vcap ]; then
|
|||
echo "Unable to clone cloudfoundry repo."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
clear_bundler_settings
|
||||
fi
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче