diff --git a/libpod/define/version.go b/libpod/define/version.go index d4cdd539de..925cd6ea03 100644 --- a/libpod/define/version.go +++ b/libpod/define/version.go @@ -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, diff --git a/pkg/varlinkapi/system.go b/pkg/varlinkapi/system.go index e5c766a6d6..883302895c 100644 --- a/pkg/varlinkapi/system.go +++ b/pkg/varlinkapi/system.go @@ -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(