refactor(print-env): omit empty kubeContext from output
Signed-off-by: Dominik Schmidt <dev@dominik-schmidt.de>
This commit is contained in:
parent
19c9beb786
commit
1ff18d31ed
|
|
@ -35,10 +35,12 @@ func (a *App) PrintEnv(c PrintEnvConfigProvider) error {
|
|||
|
||||
// Prepare output structure - include file path to identify source
|
||||
output := map[string]any{
|
||||
"filePath": filePath,
|
||||
"name": st.Env.Name,
|
||||
"kubeContext": st.Env.KubeContext,
|
||||
"values": values,
|
||||
"filePath": filePath,
|
||||
"name": st.Env.Name,
|
||||
"values": values,
|
||||
}
|
||||
if st.Env.KubeContext != "" {
|
||||
output["kubeContext"] = st.Env.KubeContext
|
||||
}
|
||||
|
||||
// Marshal based on output format
|
||||
|
|
|
|||
Loading…
Reference in New Issue