mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 13:05:46 +00:00
cmd/tailscale/cli: make dev-store-set debug command a bit more magic
Temporarily at least. Makes sharing scripts during development easier. Updates tailscale/corp#7515 Change-Id: I0e7aa461accd2c60740c1b37f3492b6bb58f1be3 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
df5e40f731
commit
c35dcd427f
@ -562,6 +562,16 @@ func runDebugComponentLogs(ctx context.Context, args []string) error {
|
||||
}
|
||||
|
||||
func runDevStoreSet(ctx context.Context, args []string) error {
|
||||
// TODO(bradfitz): remove this temporary (2022-11-09) hack once
|
||||
// profile stuff and serving CLI commands are more fleshed out.
|
||||
if len(args) >= 1 && strings.HasPrefix(args[0], "_serve/") {
|
||||
st, err := localClient.StatusWithoutPeers(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
args[0] = "_serve/node-" + string(st.Self.ID)
|
||||
log.Printf("Using key %q instead.", args[0])
|
||||
}
|
||||
if len(args) != 2 {
|
||||
return errors.New("usage: dev-store-set --danger <key> <value>")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user