diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-25 20:56:17 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-25 20:56:17 +0300 |
| commit | 2ea4878bae8fb2bdd04f07d93aa919be6cfa0142 (patch) | |
| tree | 3556610da0efab26d9918284299c61abc670b8de /src/main.rs | |
| parent | 58bcd76bfdb76ecbb8cfee868dabe60b43f16cc6 (diff) | |
feat: gate live handoff behind explicit flag
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 9a33555e..28dfd29d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -345,7 +345,19 @@ fn main() -> io::Result<()> { } if args.get(1).map(|s| s.as_str()) == Some("update") { - match update::self_update() { + let options = match update::parse_self_update_args(&args[2..]) { + Ok(options) => options, + Err(err) if err.starts_with("usage:") => { + eprintln!("{err}"); + std::process::exit(0); + } + Err(err) => { + eprintln!("{err}"); + eprintln!("usage: herdr update [--handoff]"); + std::process::exit(2); + } + }; + match update::self_update(options) { Ok(_) => return Ok(()), Err(e) => { if e.starts_with("self-update is disabled") { @@ -365,7 +377,7 @@ fn main() -> io::Result<()> { println!(" herdr --session <name> [options]"); println!(" herdr --remote <ssh-target> [--session <name>]"); println!(" herdr session attach <name>"); - println!(" herdr update"); + println!(" herdr update [--handoff]"); println!(" herdr server stop"); println!(" herdr server reload-config"); println!(" herdr config <subcommand> ..."); @@ -440,6 +452,7 @@ fn main() -> io::Result<()> { println!(" --remote <target> Attach through SSH to a remote Herdr server"); println!(" --remote-keybindings <local|server>"); println!(" Keybindings for --remote app attach (default: local)"); + println!(" --handoff Opt into live handoff for update or remote attach"); println!(" --default-config Print default configuration and exit"); println!(" --version, -V Print version and exit"); println!(" --help, -h Show this help"); |
