This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/main by this push:
new 43276eba4 Use filepath.clean in json-schema-gen command for
destination parameter (#4918)
43276eba4 is described below
commit 43276eba4d4bb3e723b4f6700060fce2b8c63d81
Author: Andrea Cosentino <[email protected]>
AuthorDate: Tue Nov 14 16:47:00 2023 +0100
Use filepath.clean in json-schema-gen command for destination parameter
(#4918)
Signed-off-by: Andrea Cosentino <[email protected]>
---
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 d5ebe78cd..79633a751 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)