From 67193e3debf47c1256a9f611b06f9c53f9e5add2 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 14 Oct 2017 14:04:14 +0200 Subject: [PATCH] Improve error message when creating lock failed --- cmd/restic/lock.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/restic/lock.go b/cmd/restic/lock.go index c147a9cb5..d0f44ee77 100644 --- a/cmd/restic/lock.go +++ b/cmd/restic/lock.go @@ -8,6 +8,7 @@ import ( "time" "github.com/restic/restic/internal/debug" + "github.com/restic/restic/internal/errors" "github.com/restic/restic/internal/repository" "github.com/restic/restic/internal/restic" ) @@ -35,7 +36,7 @@ func lockRepository(repo *repository.Repository, exclusive bool) (*restic.Lock, lock, err := lockFn(context.TODO(), repo) if err != nil { - return nil, err + return nil, errors.Fatalf("unable to create lock in backend: %v", err) } debug.Log("create lock %p (exclusive %v)", lock, exclusive)