mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-20 13:41:41 +00:00
cmd/tailscale/cli: status exit when disconnected (#720)
cmd/tailscale/cli: make status report stopped status, exit non-zero Fixes #714
This commit is contained in:
parent
cb5f3c0819
commit
bd37e40d2b
@ -127,6 +127,11 @@ func runStatus(ctx context.Context, args []string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if st.BackendState == ipn.Stopped.String() {
|
||||||
|
fmt.Println("Tailscale is stopped.")
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
f := func(format string, a ...interface{}) { fmt.Fprintf(&buf, format, a...) }
|
f := func(format string, a ...interface{}) { fmt.Fprintf(&buf, format, a...) }
|
||||||
printPS := func(ps *ipnstate.PeerStatus) {
|
printPS := func(ps *ipnstate.PeerStatus) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user