Skip to content

Commit

Permalink
Merge pull request #33887 from thaJeztah/update-version-error
Browse files Browse the repository at this point in the history
Fix NewVersionError() for clients using default version
  • Loading branch information
vieux authored Jul 12, 2017
2 parents 94260cc + ff2ed18 commit 45cad73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func IsErrPluginPermissionDenied(err error) bool {
// NewVersionError returns an error if the APIVersion required
// if less than the current supported version
func (cli *Client) NewVersionError(APIrequired, feature string) error {
if versions.LessThan(cli.version, APIrequired) {
if cli.version != "" && versions.LessThan(cli.version, APIrequired) {
return fmt.Errorf("%q requires API version %s, but the Docker daemon API version is %s", feature, APIrequired, cli.version)
}
return nil
Expand Down

0 comments on commit 45cad73

Please sign in to comment.