Skip to content
This repository was archived by the owner on Jan 16, 2021. It is now read-only.

Commit 40ffcf6

Browse files
committed
Merge pull request #25 from pavanka/migrate_message
add better messages for migrate & configure
2 parents ec3bb16 + e7c3424 commit 40ffcf6

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

configure_cmd.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ for email: %q
5050

5151
err = c.login.storeCredentials(e, email, &credentials{token: token})
5252
if err == nil {
53-
fmt.Fprintln(e.Out, "Successfully stored credentials.")
53+
if c.isDefault {
54+
fmt.Fprintln(e.Out, "Successfully stored default account key.")
55+
}
56+
fmt.Fprintf(e.Out, "Successfully stored account key for: %q.\n", email)
5457
}
5558
return stackerr.Wrap(err)
5659
}

configure_cmd_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func TestConfigureAccessToken(t *testing.T) {
2424
h.Out.String(),
2525
`
2626
Input your account key or press enter to generate a new one.
27-
Account Key: Successfully stored credentials.
27+
Account Key: Successfully stored account key for: "email".
2828
`)
2929
h.env.In = ioutil.NopCloser(strings.NewReader("email\ninvalid\n"))
3030
ensure.Err(t, c.accountKey(h.env), regexp.MustCompile("is not valid"))

login.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ To save time logging in, you should create an account key.
265265
fmt.Fprintln(
266266
e.Out,
267267
`Type "parse configure accountkey" to create a new account key.
268+
Read more at: https://parse.com/docs/js/guide#command-line-account-keys
268269
269270
Please login to Parse using your email and password.`,
270271
)

migrate_cmd.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ func (m *migrateCmd) run(e *env) error {
6161
fmt.Fprintf(e.Err, "Failed to clean up: %q. Please remove this file manually.\n", project)
6262
}
6363
}
64+
fmt.Fprintln(e.Out, "Successfully migrated to the preferred config format.")
6465
return nil
6566
}
6667

0 commit comments

Comments
 (0)