Skip to content

Commit

Permalink
Merge pull request containers#9274 from baude/bz1925928
Browse files Browse the repository at this point in the history
Fix varlink GetVersion()
  • Loading branch information
openshift-merge-robot authored Feb 8, 2021
2 parents 1741f15 + 8ef5a03 commit 82e4e66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libpod/define/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func GetVersion() (Version, error) {
}
}
return Version{
APIVersion: podmanVersion.APIVersion.String(),
APIVersion: strconv.Itoa(int(podmanVersion.APIVersion.Major)),
Version: podmanVersion.Version.String(),
GoVersion: runtime.Version(),
GitCommit: gitCommit,
Expand Down
4 changes: 2 additions & 2 deletions pkg/varlinkapi/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ import (
func (i *VarlinkAPI) GetVersion(call iopodman.VarlinkCall) error {
versionInfo, err := define.GetVersion()
if err != nil {
return err
return call.ReplyErrorOccurred(err.Error())
}

int64APIVersion, err := strconv.ParseInt(versionInfo.APIVersion, 10, 64)
if err != nil {
return err
return call.ReplyErrorOccurred(err.Error())
}

return call.ReplyGetVersion(
Expand Down

0 comments on commit 82e4e66

Please sign in to comment.