Skip to content

Commit

Permalink
Fix nil pointer error when running a fully qualified query (i.e. incl…
Browse files Browse the repository at this point in the history
…uding mod name). Closes #902
  • Loading branch information
kaidaguerre committed Sep 14, 2021
1 parent 3f7d501 commit 90b9dce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion workspace/workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -639,5 +639,6 @@ func (w *Workspace) getQueryFromFile(filename string) (string, bool, error) {

// does this resource name look like a control or query
func isNamedQueryOrControl(name string) bool {
return strings.HasPrefix(name, "query.") || strings.HasPrefix(name, "control.")
parsedResourceName, err := modconfig.ParseResourceName(name)
return err == nil && parsedResourceName.ItemType == "query" || parsedResourceName.ItemType == "control"
}

0 comments on commit 90b9dce

Please sign in to comment.