Skip to content

Commit

Permalink
🐛 use upstream config from parent
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Milchev <[email protected]>
  • Loading branch information
imilchev committed Feb 16, 2024
1 parent 7c454e4 commit 6327bcb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/cnquery/cmd/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ func getCobraScanConfig(cmd *cobra.Command, runtime *providers.Runtime, cliRes *
Incognito: conf.IsIncognito,
Creds: serviceAccount,
}
providers.DefaultRuntime().UpstreamConfig = conf.runtime.UpstreamConfig
} else {
log.Warn().Msg("No credentials provided. Switching to --incognito mode.")
conf.IsIncognito = true
Expand Down
1 change: 1 addition & 0 deletions providers/coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ func (c *coordinator) newRuntime() *Runtime {

func (c *coordinator) NewRuntimeFrom(parent *Runtime) *Runtime {
res := c.NewRuntime()
res.UpstreamConfig = parent.UpstreamConfig
res.recording = parent.Recording()
for k, v := range parent.providers {
res.providers[k] = v
Expand Down

0 comments on commit 6327bcb

Please sign in to comment.