From 43276eba4d4bb3e723b4f6700060fce2b8c63d81 Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Tue, 14 Nov 2023 16:47:00 +0100 Subject: [PATCH] Use filepath.clean in json-schema-gen command for destination parameter (#4918) Signed-off-by: Andrea Cosentino --- cmd/util/json-schema-gen/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/util/json-schema-gen/main.go b/cmd/util/json-schema-gen/main.go index d5ebe78cd2..79633a7513 100644 --- a/cmd/util/json-schema-gen/main.go +++ b/cmd/util/json-schema-gen/main.go @@ -20,12 +20,12 @@ package main import ( "encoding/json" "fmt" + "github.com/apache/camel-k/v2/pkg/util" "os" + "path/filepath" "reflect" "strings" - "github.com/apache/camel-k/v2/pkg/util" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" clientscheme "k8s.io/client-go/kubernetes/scheme" @@ -41,7 +41,7 @@ func main() { schema := os.Args[2] path := os.Args[3] isArray := os.Args[4] == "true" - destination := os.Args[5] + destination := filepath.Clean(os.Args[5]) if err := generate(crd, schema, path, isArray, destination); err != nil { panic(err)