We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94aa6e2 commit 8ae1211Copy full SHA for 8ae1211
app/cli/cmd/organization_leave.go
@@ -17,6 +17,7 @@ package cmd
17
18
import (
19
"context"
20
+ "errors"
21
"fmt"
22
23
"github.com/chainloop-dev/chainloop/app/cli/internal/action"
@@ -53,6 +54,10 @@ func newOrganizationLeaveCmd() *cobra.Command {
53
54
return fmt.Errorf("organization %s not found", orgID)
55
}
56
57
+ if membership.Current {
58
+ return errors.New("can't leave the `current` organization. To leave this org, please switch to another one")
59
+ }
60
+
61
fmt.Printf("You are about to leave the organization %q\n", membership.Org.Name)
62
63
// Ask for confirmation
0 commit comments