From fcdb69462829ae7f6d110de63abc1cb9e0f8a0e5 Mon Sep 17 00:00:00 2001 From: Cezar Craciunoiu Date: Wed, 11 Dec 2024 17:32:11 +0200 Subject: [PATCH] fix(internal): Clean volume paths of trailing slashes Signed-off-by: Cezar Craciunoiu --- internal/cli/kraft/run/utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cli/kraft/run/utils.go b/internal/cli/kraft/run/utils.go index 9cf5809e0..b2cb34bca 100644 --- a/internal/cli/kraft/run/utils.go +++ b/internal/cli/kraft/run/utils.go @@ -198,8 +198,8 @@ func (opts *RunOptions) parseVolumes(ctx context.Context, machine *machineapi.Ma var volName, mountPath string split := strings.Split(volLine, ":") if len(split) == 2 { - volName = split[0] - mountPath = split[1] + volName = filepath.Clean(split[0]) + mountPath = filepath.Clean(split[1]) } else { return fmt.Errorf("invalid syntax for --volume=%s expected --volume=:", volLine) }