Skip to content

Commit

Permalink
fix(internal): Clean volume paths of trailing slashes
Browse files Browse the repository at this point in the history
Signed-off-by: Cezar Craciunoiu <[email protected]>
  • Loading branch information
craciunoiuc committed Dec 11, 2024
1 parent 8d321c3 commit fcdb694
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/cli/kraft/run/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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=<host>:<machine>", volLine)
}
Expand Down

0 comments on commit fcdb694

Please sign in to comment.