From c6f5b96ba8102738dcb9bf21f00f0fcb8b4fe1d1 Mon Sep 17 00:00:00 2001 From: Mike Wyatt Date: Wed, 20 Feb 2013 00:14:03 -0330 Subject: allow force=yes rake gitlab:setup for capistrano deploy:cold --- lib/tasks/gitlab/setup.rake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/tasks/gitlab/setup.rake b/lib/tasks/gitlab/setup.rake index 8d4950cf396..5b74daf956e 100644 --- a/lib/tasks/gitlab/setup.rake +++ b/lib/tasks/gitlab/setup.rake @@ -7,10 +7,12 @@ namespace :gitlab do def setup_db warn_user_is_not_gitlab - puts "This will create the necessary database tables and seed the database." - puts "You will lose any previous data stored in the database." - ask_to_continue - puts "" + unless ENV['force'] == 'yes' + puts "This will create the necessary database tables and seed the database." + puts "You will lose any previous data stored in the database." + ask_to_continue + puts "" + end Rake::Task["db:setup"].invoke Rake::Task["db:seed_fu"].invoke -- cgit v1.2.1