File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -298,7 +298,8 @@ func inputQueryFromURL(url string) (query string, err error) {
298298
299299func inputQueryFromEditor (action string ) (query string , err error ) {
300300 language := "LQL"
301- if action == "create" && ! queryCmdState .EmptyTemplate && cli .LwApi .V2 .Query .RegoQueryEnabled () {
301+ regoQueryEnabled := os .Getenv ("LW_CLI_INTEGRATION_MODE" ) != "" || cli .LwApi .V2 .Query .RegoQueryEnabled ()
302+ if action == "create" && ! queryCmdState .EmptyTemplate && regoQueryEnabled {
302303 languageSelect := & survey.Select {
303304 Message : "Choose query language: " ,
304305 Options : []string {
@@ -400,7 +401,7 @@ Verify that the JSON is formatted properly and adheres to the following schema:
400401 }
401402 // smells like plain text
402403 return errors .New (`invalid query
403-
404+
404405It looks like you attempted to submit a query in YAML format.
405406Verify that the text adheres to the following schema:
406407
Original file line number Diff line number Diff line change @@ -23,6 +23,9 @@ const (
2323)
2424
2525func CatalogV1Enabled (client * api.Client ) bool {
26+ if os .Getenv ("LW_CLI_INTEGRATION_MODE" ) != "" {
27+ return true
28+ }
2629 response , err := client .V2 .FeatureFlags .GetFeatureFlagsMatchingPrefix (featureFlag )
2730 if err != nil {
2831 return false
You can’t perform that action at this time.
0 commit comments