mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-21 15:11:47 +00:00
Merge pull request #1984 from fluxcd/fix-bootstrap-path-check
Fix bootstrap path check
This commit is contained in:
commit
8bb65719cd
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
|
return "", err
|
||||||
}
|
}
|
||||||
normalizePath := func(p string) string {
|
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, "./"))
|
return fmt.Sprintf("./%s", strings.TrimPrefix(p, "./"))
|
||||||
}
|
}
|
||||||
if normalizePath(path) == normalizePath(k.Spec.Path) {
|
if normalizePath(path) == normalizePath(k.Spec.Path) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue