Skip to content
This repository was archived by the owner on Mar 24, 2019. It is now read-only.

Commit 8e1efab

Browse files
author
Steven Xie
committed
Fixed an issue with the --id-only flag for login
1 parent e62e551 commit 8e1efab

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,25 @@ quest grades # check your grades, repeatedly poll with the --poll flag
6565
quest --help # see other options
6666
```
6767

68+
#### Advanced Usage:
69+
70+
Every command has a `--help` flag, use it to see extra flags on each command.
71+
72+
For example, `quest login --help` reveals:
73+
74+
```text
75+
usage: quest login [<flags>]
76+
77+
Save Quest login credentials (obfuscates password).
78+
79+
Flags:
80+
-h, --help Show context-sensitive help (also try --help-long and
81+
--help-man).
82+
-v, --version Show application version.
83+
-i, --id-only Only save Quest ID.
84+
-c, --clear Remove saved login credentials.
85+
```
86+
6887
<br />
6988

7089
## FAQ

internal/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const (
1818
// Config contains persistent program options for begone.
1919
type Config struct {
2020
QuestID string `json:"questId"`
21-
Password string `json:"password"`
21+
Password string `json:"password,omitempty"`
2222
}
2323

2424
// Filepath returns the path to the config file.

internal/interact/login.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func PromptMissing(cfg *config.Config, skipPass bool) error {
3636
cfg.QuestID = input
3737
}
3838

39-
if cfg.Password == "" {
39+
if (cfg.Password == "") && !skipPass {
4040
var (
4141
prompt = promptui.Prompt{
4242
Label: "Quest password",

0 commit comments

Comments
 (0)