mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-04 11:06:21 +00:00
cli: kata-env: add runtime path to output
`kata-env` did not include the path to the runtime exe itself. Add that into the Runtime section. Fixes: #577 Signed-off-by: Graham Whaley <graham.whaley@intel.com>
This commit is contained in:
parent
4220a7a9be
commit
8b69c75144
@ -24,7 +24,7 @@ import (
|
|||||||
//
|
//
|
||||||
// XXX: Increment for every change to the output format
|
// XXX: Increment for every change to the output format
|
||||||
// (meaning any change to the EnvInfo type).
|
// (meaning any change to the EnvInfo type).
|
||||||
const formatVersion = "1.0.13"
|
const formatVersion = "1.0.14"
|
||||||
|
|
||||||
// MetaInfo stores information on the format of the output itself
|
// MetaInfo stores information on the format of the output itself
|
||||||
type MetaInfo struct {
|
type MetaInfo struct {
|
||||||
@ -64,6 +64,7 @@ type RuntimeInfo struct {
|
|||||||
Version RuntimeVersionInfo
|
Version RuntimeVersionInfo
|
||||||
Config RuntimeConfigInfo
|
Config RuntimeConfigInfo
|
||||||
Debug bool
|
Debug bool
|
||||||
|
Path string
|
||||||
}
|
}
|
||||||
|
|
||||||
// RuntimeVersionInfo stores details of the runtime version
|
// RuntimeVersionInfo stores details of the runtime version
|
||||||
@ -154,9 +155,12 @@ func getRuntimeInfo(configFile string, config oci.RuntimeConfig) RuntimeInfo {
|
|||||||
Path: configFile,
|
Path: configFile,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
runtimePath, _ := os.Executable()
|
||||||
|
|
||||||
return RuntimeInfo{
|
return RuntimeInfo{
|
||||||
Version: runtimeVersion,
|
Version: runtimeVersion,
|
||||||
Config: runtimeConfig,
|
Config: runtimeConfig,
|
||||||
|
Path: runtimePath,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -255,6 +255,8 @@ func getExpectedKernel(config oci.RuntimeConfig) KernelInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getExpectedRuntimeDetails(configFile string) RuntimeInfo {
|
func getExpectedRuntimeDetails(configFile string) RuntimeInfo {
|
||||||
|
runtimePath, _ := os.Executable()
|
||||||
|
|
||||||
return RuntimeInfo{
|
return RuntimeInfo{
|
||||||
Version: RuntimeVersionInfo{
|
Version: RuntimeVersionInfo{
|
||||||
Semver: version,
|
Semver: version,
|
||||||
@ -264,6 +266,7 @@ func getExpectedRuntimeDetails(configFile string) RuntimeInfo {
|
|||||||
Config: RuntimeConfigInfo{
|
Config: RuntimeConfigInfo{
|
||||||
Path: configFile,
|
Path: configFile,
|
||||||
},
|
},
|
||||||
|
Path: runtimePath,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user