Merge pull request #3420 from crosbymichael/sn-regression

Fix regression from #3403 with snapshot cmd
This commit is contained in:
Derek McGowan 2019-07-16 13:52:09 -07:00 committed by GitHub
commit 36e4c8e55d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -557,6 +557,10 @@ func (c *Client) ContentStore() content.Store {
// SnapshotService returns the underlying snapshotter for the provided snapshotter name
func (c *Client) SnapshotService(snapshotterName string) snapshots.Snapshotter {
snapshotterName, err := c.resolveSnapshotterName(context.Background(), snapshotterName)
if err != nil {
snapshotterName = DefaultSnapshotter
}
if c.snapshotters != nil {
return c.snapshotters[snapshotterName]
}