diff options
| author | Brad Fitzpatrick <bradfitz@tailscale.com> | 2023-02-07 14:35:54 -0800 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@tailscale.com> | 2023-02-07 14:36:55 -0800 |
| commit | 1502f819749491d212486afcc75bfb8f8f4662bf (patch) | |
| tree | f8ca62f2f2c99e5392f7dd163080616fa356290e | |
| parent | cab2b2b59ec9d97edf5f7f67ea2811ec34429858 (diff) | |
| download | tailscale-bradfitz/win_unattended_warning.tar.xz tailscale-bradfitz/win_unattended_warning.zip | |
ipn/ipnlocal: return error on missing --unattended on CLI up on Windowsbradfitz/win_unattended_warning
Maybe not the best long-term fix, but better than letting the user
start the server for a millisecond just to have it all torn down as
their CLI command finishes running.
Updates #7055
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
| -rw-r--r-- | ipn/ipnlocal/local.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go index 6a8ab8f1c..1ef441e74 100644 --- a/ipn/ipnlocal/local.go +++ b/ipn/ipnlocal/local.go @@ -2498,6 +2498,9 @@ func (b *LocalBackend) checkPrefsLocked(p *ipn.Prefs) error { if err := b.checkExitNodePrefsLocked(p); err != nil { errs = append(errs, err) } + if runtime.GOOS == "windows" && p.WantRunning && !p.ForceDaemon && len(b.notifyWatchers) == 0 { + errs = append(errs, errors.New("Use 'tailscale up --unattended' on Windows without GUI")) + } return multierr.New(errs...) } |
