Skip to content

Commit

Permalink
Handle empty root path
Browse files Browse the repository at this point in the history
  • Loading branch information
pipe01 committed Feb 24, 2024
1 parent 039db70 commit 76b4d23
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/client/cmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ func (c *ImportCmd) Run(cl client.Client) error {
var data interface{}

root := strings.Split(c.Root, ".")
if len(root) == 1 && root[0] == c.Root {
root = nil
}

f, err := os.ReadFile(c.JSONPath)
if err != nil {
Expand Down

0 comments on commit 76b4d23

Please sign in to comment.