Remove the default org (#270)

This commit is contained in:
Jeff Mitchell authored and GitHub committed 2020-08-17 15:38:41 -04:00
1 parent 01059e6ca8
commit 282177afc2
24 files changed
+190 -431

No files matched your search

-15
View File
@@ -171,9 +171,6 @@ func (c *Command) Run(args []string) int {
c.UI.Error(fmt.Errorf("Error creating controller dev config: %w", err).Error())
return 1
}
if c.flagDevOrgId != "" {
devConfig.DefaultOrgId = c.flagDevOrgId
}
if c.flagDevAuthMethodId != "" {
prefix := password.AuthMethodPrefix + "_"
if !strings.HasPrefix(c.flagDevAuthMethodId, prefix) {
@@ -212,18 +209,6 @@ func (c *Command) Run(args []string) int {
}
}
if devConfig.DefaultOrgId != "" {
if !strings.HasPrefix(devConfig.DefaultOrgId, "o_") {
c.UI.Error(fmt.Sprintf("Invalid default org ID, must start with %q", "o_"))
return 1
}
if len(devConfig.DefaultOrgId) != 12 {
c.UI.Error(fmt.Sprintf("Invalid default org ID, must be 10 base62 characters after %q", "o_"))
return 1
}
c.DefaultOrgId = devConfig.DefaultOrgId
}
if err := c.SetupLogging(c.flagLogLevel, c.flagLogFormat, "", ""); err != nil {
c.UI.Error(err.Error())
return 1