cli: fixed error message when trying 'repo sync-to from-config' and the config file is connected to the repository server (#1304)

This commit is contained in:
Jarek Kowalski authored and GitHub committed 2021-09-19 21:54:47 -07:00
1 parent e9a82c974f
commit 5ab712b3e7
1 file changed
+4
@@ -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)
}