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

@@ -363,9 +363,6 @@ func (c *Command) ParseFlagsAndConfig(args []string) int {
return 1
}
if c.flagDevOrgId != "" {
c.Config.DefaultOrgId = c.flagDevOrgId
}
if c.flagDevAuthMethodId != "" {
prefix := password.AuthMethodPrefix + "_"
if !strings.HasPrefix(c.flagDevAuthMethodId, prefix) {
@@ -405,18 +402,6 @@ func (c *Command) ParseFlagsAndConfig(args []string) int {
}
}
if c.Config.DefaultOrgId != "" {
if !strings.HasPrefix(c.Config.DefaultOrgId, "o_") {
c.UI.Error(fmt.Sprintf("Invalid default org ID, must start with %q", "o_"))
return 1
}
if len(c.Config.DefaultOrgId) != 12 {
c.UI.Error(fmt.Sprintf("Invalid default org ID, must be 10 base62 characters after %q", "o_"))
return 1
}
c.DefaultOrgId = c.Config.DefaultOrgId
}
return 0
}