ignore provider check in init repo (#3753)
<!-- PR description--> don't check after fetching account type for repo init command #### Does this PR need a docs update or release note? - [x] ⛔ No #### Type of change <!--- Please check the type of change your PR introduces: ---> - [x] 🐛 Bugfix #### Issue(s) <!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. --> #### Test Plan <!-- How will this be tested prior to merging.--> - [x] ⚡ Unit test
This commit is contained in:
parent
cce7d4e0ad
commit
e69d389aaa
@ -16,11 +16,6 @@ import (
|
|||||||
func m365ConfigsFromViper(vpr *viper.Viper) (account.M365Config, error) {
|
func m365ConfigsFromViper(vpr *viper.Viper) (account.M365Config, error) {
|
||||||
var m365 account.M365Config
|
var m365 account.M365Config
|
||||||
|
|
||||||
providerType := vpr.GetString(AccountProviderTypeKey)
|
|
||||||
if providerType != account.ProviderM365.String() {
|
|
||||||
return m365, clues.New("unsupported account provider: " + providerType)
|
|
||||||
}
|
|
||||||
|
|
||||||
m365.AzureClientID = vpr.GetString(AzureClientID)
|
m365.AzureClientID = vpr.GetString(AzureClientID)
|
||||||
m365.AzureClientSecret = vpr.GetString(AzureSecret)
|
m365.AzureClientSecret = vpr.GetString(AzureSecret)
|
||||||
m365.AzureTenantID = vpr.GetString(AzureTenantIDKey)
|
m365.AzureTenantID = vpr.GetString(AzureTenantIDKey)
|
||||||
@ -58,6 +53,11 @@ func configureAccount(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if matchFromConfig {
|
if matchFromConfig {
|
||||||
|
providerType := vpr.GetString(AccountProviderTypeKey)
|
||||||
|
if providerType != account.ProviderM365.String() {
|
||||||
|
return acct, clues.New("unsupported account provider: " + providerType)
|
||||||
|
}
|
||||||
|
|
||||||
if err := mustMatchConfig(vpr, m365Overrides(overrides)); err != nil {
|
if err := mustMatchConfig(vpr, m365Overrides(overrides)); err != nil {
|
||||||
return acct, clues.Wrap(err, "verifying m365 configs in corso config file")
|
return acct, clues.Wrap(err, "verifying m365 configs in corso config file")
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user