You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by as...@apache.org on 2020/06/04 07:24:06 UTC
[camel-k] branch master updated: sanitized integration name on
Windows contains whole path
This is an automated email from the ASF dual-hosted git repository.
astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/master by this push:
new 83ccc4b sanitized integration name on Windows contains whole path
83ccc4b is described below
commit 83ccc4b8a3d0de7d314076d1e369937c723fed42
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Jun 3 17:09:46 2020 +0200
sanitized integration name on Windows contains whole path
---
pkg/util/kubernetes/sanitize.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pkg/util/kubernetes/sanitize.go b/pkg/util/kubernetes/sanitize.go
index 1ed8026..c7f5fed 100644
--- a/pkg/util/kubernetes/sanitize.go
+++ b/pkg/util/kubernetes/sanitize.go
@@ -18,7 +18,7 @@ limitations under the License.
package kubernetes
import (
- "path"
+ "path/filepath"
"regexp"
"strings"
"unicode"
@@ -30,7 +30,7 @@ var disallowedChars = regexp.MustCompile(`[^a-z0-9-]`)
// SanitizeName sanitizes the given name to be compatible with k8s
func SanitizeName(name string) string {
- name = path.Base(name)
+ name = filepath.Base(name)
name = strings.Split(name, ".")[0]
name = scase.KebabCase(name)
name = strings.ToLower(name)