mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-10 01:37:29 +00:00
Fix bootstrap path check
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
parent
ebd145f7f7
commit
4352915945
1 changed files with 4 additions and 0 deletions
|
|
@ -159,6 +159,10 @@ func kustomizationPathDiffers(ctx context.Context, kube client.Client, objKey cl
|
|||
return "", err
|
||||
}
|
||||
normalizePath := func(p string) string {
|
||||
// remove the trailing '/' if the path is not './'
|
||||
if len(p) > 2 {
|
||||
p = strings.TrimSuffix(p, "/")
|
||||
}
|
||||
return fmt.Sprintf("./%s", strings.TrimPrefix(p, "./"))
|
||||
}
|
||||
if normalizePath(path) == normalizePath(k.Spec.Path) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue