Fix version command on bypassing to moby cli

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
This commit is contained in:
Ulysses Souza 2020-10-02 19:04:43 +02:00
parent 74e86ab06a
commit 344db70274
1 changed files with 3 additions and 0 deletions

View File

@ -61,7 +61,10 @@ func runVersion(cmd *cobra.Command, version string) {
case formatter.JSON, "{{json.}}": // Try to catch full JSON formats
versionString = strings.Replace(getOutFromMoby(cmd, fixedJSONArgs(os.Args[1:])...),
`"Version":`, fmt.Sprintf(`"CloudIntegration":%q,"Version":`, displayedVersion), 1)
default:
versionString = getOutFromMoby(cmd)
}
fmt.Print(versionString)
}