Propagate options to repo and operations (#1932)
## Description Make sure the options struct is passed through the entire stack so we actually have access to flag values. ## Does this PR need a docs update or release note? - [ ] ✅ Yes, it's included - [ ] 🕐 Yes, but in a later PR - [x] ⛔ No ## Type of change - [ ] 🌻 Feature - [x] 🐛 Bugfix - [ ] 🗺️ Documentation - [ ] 🤖 Test - [ ] 💻 CI/Deployment - [x] 🐹 Trivial/Minor ## Issue(s) * closes #1931 ## Test Plan - [x] 💪 Manual - [ ] ⚡ Unit test - [ ] 💚 E2E
This commit is contained in:
parent
37f1a3eca5
commit
91b9f2e825
@ -16,7 +16,6 @@ import (
|
||||
"github.com/alcionai/corso/src/internal/model"
|
||||
"github.com/alcionai/corso/src/pkg/backup"
|
||||
"github.com/alcionai/corso/src/pkg/backup/details"
|
||||
"github.com/alcionai/corso/src/pkg/control"
|
||||
"github.com/alcionai/corso/src/pkg/path"
|
||||
"github.com/alcionai/corso/src/pkg/repository"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
@ -264,7 +263,7 @@ func createExchangeCmd(cmd *cobra.Command, args []string) error {
|
||||
return Only(ctx, err)
|
||||
}
|
||||
|
||||
r, err := repository.Connect(ctx, acct, s, control.Options{})
|
||||
r, err := repository.Connect(ctx, acct, s, options.Control())
|
||||
if err != nil {
|
||||
return Only(ctx, errors.Wrapf(err, "Failed to connect to the %s repository", s.Provider))
|
||||
}
|
||||
|
||||
@ -192,7 +192,7 @@ func DataCollections(
|
||||
acct,
|
||||
scope,
|
||||
dps,
|
||||
control.Options{},
|
||||
ctrlOpts,
|
||||
su)
|
||||
if err != nil {
|
||||
user := scope.Get(selectors.ExchangeUser)
|
||||
|
||||
@ -125,6 +125,7 @@ func Initialize(
|
||||
Account: acct,
|
||||
Storage: s,
|
||||
Bus: bus,
|
||||
Opts: opts,
|
||||
dataLayer: w,
|
||||
modelStore: ms,
|
||||
}
|
||||
@ -192,6 +193,7 @@ func Connect(
|
||||
Account: acct,
|
||||
Storage: s,
|
||||
Bus: bus,
|
||||
Opts: opts,
|
||||
dataLayer: w,
|
||||
modelStore: ms,
|
||||
}, nil
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user