From 050960b20e2ecc33f5f535951fc20bbfefb58cea Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Mon, 28 Dec 2015 21:04:24 +0530 Subject: [PATCH] restore: display appropriate message when no backup is selected --- assets/runtime/functions | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/assets/runtime/functions b/assets/runtime/functions index 542e7b67..5c63ee41 100644 --- a/assets/runtime/functions +++ b/assets/runtime/functions @@ -1126,6 +1126,12 @@ execute_raketask() { echo read -p "Select a backup to restore: " file + + if [[ -z ${file} ]]; then + echo "Backup not specified. Exiting..." + return 1 + fi + if [[ ! -f ${GITLAB_BACKUP_DIR}/${file} ]]; then echo "Specified backup does not exist. Aborting..." return 1