-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from logfire-ai/repo-sync/cli-private/main
🔄 synced file(s) with logfire-ai/cli-private
- Loading branch information
Showing
12 changed files
with
116 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,7 +66,7 @@ func NewLoginCmd(f *cmdutil.Factory) *cobra.Command { | |
# authenticate against logfire.ai by magic link token | ||
# First request a Magic link to your email address | ||
$ logfire login --email <[email protected]> | ||
# Second authenticate using the token received on your email address | ||
$ logfire login --token <token> | ||
`), | ||
|
@@ -120,7 +120,7 @@ func loginRun(opts *LoginOptions) { | |
} | ||
} | ||
|
||
var choiceList = []string{"Magic link", "Password"} | ||
var choiceList = []string{"Magic link", "Password", "Exit"} | ||
|
||
if opts.Interactive && opts.Token == "" && opts.Email == "" && opts.Password == "" { | ||
choice, err := opts.Prompter.Select("Select login method (Default: Magic link)", "Magic link", choiceList) | ||
|
@@ -187,6 +187,9 @@ func loginRun(opts *LoginOptions) { | |
fmt.Fprintf(opts.IO.ErrOut, "\n%s Failed to sign in\n", cs.FailureIcon()) | ||
return | ||
} | ||
|
||
case "Exit": | ||
os.Exit(0) | ||
} | ||
} else { | ||
isEmpty := func(s string) bool { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.