diff --git a/cmd/influx/query.go b/cmd/influx/query.go index 879f4eda14a..e26e19d9c34 100644 --- a/cmd/influx/query.go +++ b/cmd/influx/query.go @@ -5,7 +5,6 @@ import ( "fmt" "github.com/influxdata/flux" - "github.com/influxdata/flux/repl" _ "github.com/influxdata/flux/stdlib" platform "github.com/influxdata/influxdb" @@ -43,8 +42,6 @@ func init() { } func fluxQueryF(cmd *cobra.Command, args []string) error { - flux.FinalizeBuiltIns() - if flags.local { return fmt.Errorf("local flag not supported for query command") } @@ -81,6 +78,8 @@ func fluxQueryF(cmd *cobra.Command, args []string) error { orgID = o.ID } + flux.FinalizeBuiltIns() + r, err := getFluxREPL(flags.host, flags.token, orgID) if err != nil { return fmt.Errorf("failed to get the flux REPL: %v", err) diff --git a/cmd/influx/repl.go b/cmd/influx/repl.go index a74c52811ce..1dc40494d7e 100644 --- a/cmd/influx/repl.go +++ b/cmd/influx/repl.go @@ -42,8 +42,6 @@ func init() { } func replF(cmd *cobra.Command, args []string) error { - flux.FinalizeBuiltIns() - if flags.local { return fmt.Errorf("local flag not supported for repl command") } @@ -73,6 +71,8 @@ func replF(cmd *cobra.Command, args []string) error { } } + flux.FinalizeBuiltIns() + r, err := getFluxREPL(flags.host, flags.token, orgID) if err != nil { return err