diff --git a/cmd/root.go b/cmd/root.go index f59f157..9bbe96f 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -60,6 +60,7 @@ func init() { if cmd != "init" && cmd != "sign-out" && cmd != "sign-in" && + cmd != "sign-up" && cmd != "env-set" && cmd != "env-print" && cmd != "--help" { @@ -131,6 +132,7 @@ func cobraInitCallback(cmd string) { if cmd != "init" && cmd != "sign-out" && cmd != "sign-in" && + cmd != "sign-up" && cmd != "--help" { logger.Log("\n") warningText := "You aren't signed in. Some features won't be available! To sign in, run \x1b[1m'foundry sign-in'\x1b[0m or \x1b[1m'foundry sign-up'\x1b[0m to sign up.\nThis message will self-destruct in 5s...\n" diff --git a/cmd/signin.go b/cmd/signin.go index 72639cb..ee2309c 100644 --- a/cmd/signin.go +++ b/cmd/signin.go @@ -23,12 +23,12 @@ var ( qs = []*survey.Question{ { Name: "email", - Prompt: &survey.Input{Message: "Email:"}, + Prompt: &survey.Input{Message: "Foundry email:"}, Validate: survey.Required, }, { Name: "pass", - Prompt: &survey.Password{Message: "Password:"}, + Prompt: &survey.Password{Message: "Foundry password:"}, Validate: survey.Required, }, } @@ -44,6 +44,8 @@ func runSignIn(cmd *cobra.Command, args []string) { Pass string `survey:"pass` }{} + logger.Logln("Sign in to your Foundry account\n") + err := survey.Ask(qs, &creds) // Without this specific "if" SIGINT (Ctrl+C) would only // interrupt the survey's prompt and not the whole program diff --git a/cmd/signup.go b/cmd/signup.go index 201552f..16156fa 100644 --- a/cmd/signup.go +++ b/cmd/signup.go @@ -1,6 +1,7 @@ package cmd import ( + "foundry/cli/logger" "log" "os" @@ -51,6 +52,8 @@ func runSignUp(cmd *cobra.Command, args []string) { PassAgain string `survey:"passAgain` }{} + logger.Logln("Create new Foundry account\n") + // Ask for email err := survey.Ask(emailQ, &creds) // Without this specific "if" SIGINT (Ctrl+C) would only diff --git a/go.sum b/go.sum index 4f6322c..a7bdd74 100644 --- a/go.sum +++ b/go.sum @@ -191,6 +191,7 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=