Skip to content

Add --skipcache option to id command #2310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 14, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions go/client/cmd_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type CmdID struct {
user string
trackStatement bool
useDelegateUI bool
skipProofCache bool
}

func (v *CmdID) ParseArgv(ctx *cli.Context) error {
Expand All @@ -33,15 +34,17 @@ func (v *CmdID) ParseArgv(ctx *cli.Context) error {
}
v.trackStatement = ctx.Bool("track-statement")
v.useDelegateUI = ctx.Bool("ui")
v.skipProofCache = ctx.Bool("skip-proof-cache")
return nil
}

func (v *CmdID) makeArg() keybase1.IdentifyArg {
return keybase1.IdentifyArg{
UserAssertion: v.user,
TrackStatement: v.trackStatement,
UseDelegateUI: v.useDelegateUI,
Reason: keybase1.IdentifyReason{Reason: "CLI id command"},
UserAssertion: v.user,
TrackStatement: v.trackStatement,
UseDelegateUI: v.useDelegateUI,
Reason: keybase1.IdentifyReason{Reason: "CLI id command"},
ForceRemoteCheck: v.skipProofCache,
}
}

Expand Down Expand Up @@ -89,6 +92,11 @@ func NewCmdID(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command {
Usage: "Use identify UI.",
HideUsage: !develUsage,
},
cli.BoolFlag{
Name: "s, skip-proof-cache",
Usage: "Skip cached proofs, force re-check",
HideUsage: !develUsage,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey I just realized, I copied this from another command - is this supposed to be only for devel?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure. Let's start with devel only for now, as that sounds like what the ticket is for.

},
},
Action: func(c *cli.Context) {
cl.ChooseCommand(NewCmdIDRunner(g), "id", c)
Expand Down