From b057e58b6f32c9458fe212e8ef01ca4214860667 Mon Sep 17 00:00:00 2001 From: dosire Date: Thu, 23 Jan 2014 11:44:53 +0100 Subject: [PATCH 1/2] Reword upgrade -y comment, improve layout and allow just y. --- doc/update/upgrader.md | 4 +--- lib/gitlab/upgrader.rb | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/update/upgrader.md b/doc/update/upgrader.md index 1f51005a8e9..4ced6357962 100644 --- a/doc/update/upgrader.md +++ b/doc/update/upgrader.md @@ -19,10 +19,8 @@ __GitLab Upgrader is available only for version 6.4.2 or higher__ cd /home/git/gitlab sudo -u git -H ruby script/upgrade.rb - - # it also supports -y option to avouid user input + # to perform a non-interactive install (no user input required) you can add -y # sudo -u git -H ruby script/upgrade.rb -y - ### 3. Start application diff --git a/lib/gitlab/upgrader.rb b/lib/gitlab/upgrader.rb index 859923cb563..d48fb8a40ca 100644 --- a/lib/gitlab/upgrader.rb +++ b/lib/gitlab/upgrader.rb @@ -17,7 +17,7 @@ module Gitlab prompt("Do you want to upgrade (yes/no)? ", %w{yes no}) end - if answer == "yes" + if answer == "yes" || answer == "y" upgrade else exit 0 From f1da402be753a7cfff1fe7c8be96ce61a1ec3f58 Mon Sep 17 00:00:00 2001 From: dosire Date: Tue, 11 Feb 2014 10:06:25 +0100 Subject: [PATCH 2/2] Require a full yes. --- lib/gitlab/upgrader.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gitlab/upgrader.rb b/lib/gitlab/upgrader.rb index d48fb8a40ca..859923cb563 100644 --- a/lib/gitlab/upgrader.rb +++ b/lib/gitlab/upgrader.rb @@ -17,7 +17,7 @@ module Gitlab prompt("Do you want to upgrade (yes/no)? ", %w{yes no}) end - if answer == "yes" || answer == "y" + if answer == "yes" upgrade else exit 0