git.delta.rocks / remowt / refs/commits / 61cfb317f078

difftreelog

fix rofi cancellation

xwvqqwwvYaroslav Bolyukin3 days agoparent: #023a07f.patch.diff
in: trunk

2 files changed

modifiedcrates/remowt-client/src/subprocess.rsdiffbeforeafterboth
--- a/crates/remowt-client/src/subprocess.rs
+++ b/crates/remowt-client/src/subprocess.rs
@@ -64,12 +64,12 @@
 		drop(stdin);
 		let drain_out = async move {
 			if let Some(s) = stdout {
-				drain_to_tracing(s, "<child stdout>".to_owned(), false).await;
+				let _ = drain_to_tracing(s, "<child stdout>".to_owned(), false).await;
 			}
 		};
 		let drain_err = async move {
 			if let Some(s) = stderr {
-				drain_to_tracing(s, "<child stderr>".to_owned(), true).await;
+				let _ = drain_to_tracing(s, "<child stderr>".to_owned(), true).await;
 			}
 		};
 		let wait = async move {
modifiedcrates/remowt-ui-prompt/src/rofi.rsdiffbeforeafterboth
46 "-mesg",46 "-mesg",
47 &mesg,47 &mesg,
48 "-sync",48 "-sync",
49 "-only-match",49 "-no-custom",
50 "-p",50 "-p",
51 fixup_prompt(prompt),51 fixup_prompt(prompt),
52 "-format",52 "-format",
79 .wait_with_output()79 .wait_with_output()
80 .await80 .await
81 .map_err(|e| Error::InputError(format!("failed to wait for rofi: {e}")))?;81 .map_err(|e| Error::InputError(format!("failed to wait for rofi: {e}")))?;
82 match out.status.code() {
83 Some(0) => {}
84 Some(1) => return Err(Error::Cancel),
85 other => {
86 return Err(Error::InputError(format!(
87 "rofi exited with status {other:?}"
88 )));
89 }
90 }
82 let stdout = out91 let stdout = out
83 .stdout92 .stdout
84 .strip_suffix(b"\n")93 .strip_suffix(b"\n")
133 .wait_with_output()142 .wait_with_output()
134 .await143 .await
135 .map_err(|e| Error::InputError(format!("failed to wait for rofi: {e}")))?;144 .map_err(|e| Error::InputError(format!("failed to wait for rofi: {e}")))?;
145 match out.status.code() {
146 Some(0) => {}
147 Some(1) => return Err(Error::Cancel),
148 other => {
149 return Err(Error::InputError(format!(
150 "rofi exited with status {other:?}"
151 )));
152 }
153 }
136 let stdout = out154 let stdout = out
137 .stdout155 .stdout
138 .strip_suffix(b"\n")156 .strip_suffix(b"\n")