Skip to content

Commit

Permalink
short cut
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiwara committed Sep 17, 2024
1 parent f4fcddc commit 2ceb58a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tfstate/lookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ var (
)

func quoteJQQuery(query string) string {
if query == "" || !strings.Contains(query, "-") {
// short-circuit if query is empty or doesn't contain hyphen
return query
}
parts := quoteSplitRegex.Split(query, -1)
parts_coalesced := make([]string, 0, len(parts))

Expand Down

0 comments on commit 2ceb58a

Please sign in to comment.