Skip to content

Commit

Permalink
fix(cli) tests
Browse files Browse the repository at this point in the history
  • Loading branch information
helderbetiol committed Apr 25, 2024
1 parent 38ba5dd commit a074dd0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CLI/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ func (n *getObjectNode) execute() (interface{}, error) {
return nil, err
}

if len(n.attrs) > 0 {
if n.attrs != nil && len(n.attrs) > 0 {
var relativePath *views.RelativePathArgs
if n.recursive.isRecursive {
relativePath = &views.RelativePathArgs{
Expand Down
3 changes: 2 additions & 1 deletion CLI/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -744,8 +744,9 @@ func (p *parser) parseGet() node {
_, isRecursive := args["r"]

path := p.parsePath("")
attrs := []string{}
var attrs []string
if p.parseExact(":") {
attrs = []string{}
for {
attrs = append(attrs, p.parseComplexWord("attribute"))
if !p.parseExact(",") {
Expand Down

0 comments on commit a074dd0

Please sign in to comment.