From 2078d8409ebb9718df5dd8d991cfe9eed36f030e Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Thu, 19 Dec 2024 15:09:17 +0100 Subject: [PATCH] Make cfgvars unit test pass on windows Signed-off-by: Natanael Copa --- pkg/config/cfgvars.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/config/cfgvars.go b/pkg/config/cfgvars.go index f8e720209473..3acfc10734f6 100644 --- a/pkg/config/cfgvars.go +++ b/pkg/config/cfgvars.go @@ -107,7 +107,9 @@ func WithCommand(cmd command) CfgVarOption { } if f, err := flags.GetString("kubelet-root-dir"); err == nil && f != "" { - c.KubeletRootDir = f + if f, err := filepath.Abs(f); err == nil { + c.KubeletRootDir = f + } } if f, err := flags.GetString("config"); err == nil && f != "" {