]> git.proxmox.com Git - pve-xtermjs.git/commitdiff
update to clap 3 / proxmox-sys 0.4
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 23 Jan 2023 09:28:15 +0000 (10:28 +0100)
committerDominik Csapak <d.csapak@proxmox.com>
Mon, 23 Jan 2023 09:32:16 +0000 (10:32 +0100)
only major difference was that clap now does not allow invalid utf8 by
default, but that's necessary for our 'cmd' parameter so add that

(also includes a rustfmt fixup)

Acked-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Cargo.toml
src/main.rs

index 2f3a3a6665a7ad093074aeb3ea811920fb182ace..c4466cc7df2ea742a0aef446d45e27845809995a 100644 (file)
@@ -14,7 +14,7 @@ exclude = [ "build", "debian" ]
 anyhow = "1"
 mio = { version = "0.8", features = [ "net", "os-ext" ] }
 ureq = { version = "2.4", default-features = false, features = [ "gzip" ] }
-clap = "2.33"
+clap = "3"
 proxmox-io = "1"
 proxmox-lang = "1.1"
-proxmox-sys = "0.3"
+proxmox-sys = "0.4"
index f53a726bd6dde8a519cb837d1ae5cdd124b13165..6ad72bf77f2636b78d44e367643712ae5b3c9b3b 100644 (file)
@@ -15,9 +15,7 @@ use mio::{Events, Interest, Poll, Token};
 
 use proxmox_io::ByteBuffer;
 use proxmox_lang::error::io_err_other;
-use proxmox_sys::{
-    linux::pty::{make_controlling_terminal, PTY},
-};
+use proxmox_sys::linux::pty::{make_controlling_terminal, PTY};
 
 const MSG_TYPE_DATA: u8 = 0;
 const MSG_TYPE_RESIZE: u8 = 1;
@@ -266,7 +264,12 @@ fn do_main() -> Result<()> {
                 .required(true),
         )
         .arg(Arg::with_name("perm").takes_value(true).long("perm"))
-        .arg(Arg::with_name("cmd").multiple(true).required(true))
+        .arg(
+            Arg::with_name("cmd")
+                .allow_invalid_utf8(true)
+                .multiple(true)
+                .required(true),
+        )
         .get_matches();
 
     let port: u64 = matches