From 8a37445b81845b66961a9d5e7b7223450b0025b3 Mon Sep 17 00:00:00 2001 From: Jake Cooper Date: Wed, 7 Oct 2020 14:17:57 -0700 Subject: [PATCH] Require account for create (#21) --- cmd/init.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/init.go b/cmd/init.go index 035e87a4f..55c5eefbc 100644 --- a/cmd/init.go +++ b/cmd/init.go @@ -100,6 +100,10 @@ func (h *Handler) initFromID(ctx context.Context, req *entity.CommandRequest) er func (h *Handler) Init(ctx context.Context, req *entity.CommandRequest) error { isLoggedIn, _ := h.ctrl.IsLoggedIn(ctx) + if !isLoggedIn { + return errors.New("Account require to init project") + } + selection, err := ui.PromptInit(isLoggedIn) if err != nil { return err