|
@@ -46,6 +46,7 @@ func VersionCommand(version string) *cobra.Command {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func runVersion(cmd *cobra.Command, version string) error {
|
|
func runVersion(cmd *cobra.Command, version string) error {
|
|
|
|
|
+ displayedVersion := strings.TrimPrefix(version, "v")
|
|
|
versionResult, _ := mobycli.ExecSilent(cmd.Context())
|
|
versionResult, _ := mobycli.ExecSilent(cmd.Context())
|
|
|
// we don't want to fail on error, there is an error if the engine is not available but it displays client version info
|
|
// we don't want to fail on error, there is an error if the engine is not available but it displays client version info
|
|
|
// Still, technically the [] byte versionResult could be nil, just let the original command display what it has to display
|
|
// Still, technically the [] byte versionResult could be nil, just let the original command display what it has to display
|
|
@@ -53,6 +54,6 @@ func runVersion(cmd *cobra.Command, version string) error {
|
|
|
return mobycli.ExecCmd(cmd)
|
|
return mobycli.ExecCmd(cmd)
|
|
|
}
|
|
}
|
|
|
var s string = string(versionResult)
|
|
var s string = string(versionResult)
|
|
|
- fmt.Print(strings.Replace(s, "\n Version:", "\n Azure integration "+version+"\n Version:", 1))
|
|
|
|
|
|
|
+ fmt.Print(strings.Replace(s, "\n Version:", "\n Azure integration "+displayedVersion+"\n Version:", 1))
|
|
|
return nil
|
|
return nil
|
|
|
}
|
|
}
|