Skip to content

Commit 04ea995

Browse files
committed
fix: fix auth issue
1 parent d767ea9 commit 04ea995

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pkg/cmd/init.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ var initCommand = cli.Command{
104104
}
105105

106106
func handleInit(ctx context.Context, cmd *cli.Command) error {
107-
cc := getAPICommandContext(cmd)
108-
109107
if err := authenticate(ctx, cmd, false); err != nil {
110108
return err
111109
}
@@ -114,8 +112,9 @@ func handleInit(ctx context.Context, cmd *cli.Command) error {
114112
return err
115113
}
116114

117-
orgs := fetchUserOrgs(cc.client, ctx)
115+
cc := getAPICommandContext(cmd)
118116

117+
orgs := fetchUserOrgs(cc.client, ctx)
119118
orgs, err := ensureUserHasOrg(ctx, cmd, cc.client, orgs)
120119
if err != nil {
121120
return err

0 commit comments

Comments
 (0)