mirror of
https://github.com/fluxcd/flux2.git
synced 2025-10-29 23:37:47 +08:00
Use path with '/' slashes in created Kustomization
This fixes a bug on Windows where the safe relative path would contain '\' slashes, which are not compatible with the controller. Signed-off-by: Hidde Beydals <hello@hidde.co>
This commit is contained in:
@ -19,6 +19,7 @@ package main
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@ -142,7 +143,7 @@ func createKsCmdRun(cmd *cobra.Command, args []string) error {
|
||||
Interval: metav1.Duration{
|
||||
Duration: createArgs.interval,
|
||||
},
|
||||
Path: kustomizationArgs.path.String(),
|
||||
Path: filepath.ToSlash(kustomizationArgs.path.String()),
|
||||
Prune: kustomizationArgs.prune,
|
||||
SourceRef: kustomizev1.CrossNamespaceSourceReference{
|
||||
Kind: kustomizationArgs.source.Kind,
|
||||
|
||||
Reference in New Issue
Block a user