Skip to content

Commit

Permalink
Use filepath.clean in json-schema-gen command for destination parameter
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Cosentino <[email protected]>
  • Loading branch information
oscerd committed Nov 14, 2023
1 parent c2240b1 commit 8254b7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/util/json-schema-gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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)
Expand Down

0 comments on commit 8254b7f

Please sign in to comment.