From 7e1fb6130a3cc7994e80400843fde63ca288c1e1 Mon Sep 17 00:00:00 2001 From: Gilbert Chen Date: Thu, 26 Oct 2017 21:03:19 -0400 Subject: [PATCH] Error out immediately if the storage can't be found --- duplicacy/duplicacy_main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/duplicacy/duplicacy_main.go b/duplicacy/duplicacy_main.go index 4055273..9d93850 100644 --- a/duplicacy/duplicacy_main.go +++ b/duplicacy/duplicacy_main.go @@ -372,7 +372,8 @@ func configRepository(context *cli.Context, init bool) { otherPreference := duplicacy.FindPreference(context.String("copy")) if otherPreference == nil { - + duplicacy.LOG_ERROR("STORAGE_NOTFOUND", "Storage '%s' can't be found", context.String("copy")) + return } otherStorage := duplicacy.CreateStorage(*otherPreference, false, 1)