From 5ab712b3e70db0d39e207231ca945e042e71fb81 Mon Sep 17 00:00:00 2001 From: Jarek Kowalski Date: Sun, 19 Sep 2021 21:54:47 -0700 Subject: [PATCH] cli: fixed error message when trying 'repo sync-to from-config' and the config file is connected to the repository server (#1304) --- cli/command_repository_connect_from_config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cli/command_repository_connect_from_config.go b/cli/command_repository_connect_from_config.go index 72e2a1b51..99d070fc6 100644 --- a/cli/command_repository_connect_from_config.go +++ b/cli/command_repository_connect_from_config.go @@ -46,6 +46,10 @@ func (c *storageFromConfigFlags) connectToStorageFromConfigFile(ctx context.Cont return nil, errors.Wrap(err, "unable to open config") } + if cfg.Storage == nil { + return nil, errors.Errorf("connection file does not specify blob storage connection parameters, kopia server connections are not supported") + } + // nolint:wrapcheck return blob.NewStorage(ctx, *cfg.Storage) }