mirror of
https://github.com/kopia/kopia.git
synced 2026-10-21 05:34:42 -04:00
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:
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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user