summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <github@bigly.dog>2024-04-07 23:33:03 -0700
committerroot <github@bigly.dog>2024-04-07 23:36:11 -0700
commite5faa851220dbceb32b937fc808e178cc02d1700 (patch)
tree0ee1152eab655d542e1f264f9dc4c6047649356b
parent1389b75d0af36d627170ea121f5101d84304fcd2 (diff)
no encoded bytes conv
-rw-r--r--src/subprocess.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/subprocess.rs b/src/subprocess.rs
index b1fc435..112f82a 100644
--- a/src/subprocess.rs
+++ b/src/subprocess.rs
@@ -11,6 +11,9 @@ use {
},
};
+#[cfg(target_family = "unix")]
+use std::os::unix::ffi::OsStrExt;
+
#[derive(Clone, Debug)]
pub struct SubprocCommand {
pub prog: PathBuf,
@@ -40,6 +43,9 @@ where
Err(e)
}
Some(Ok(print)) => {
+ #[cfg(target_family = "unix")]
+ let bytes = print.as_bytes();
+ #[cfg(target_family = "windows")]
let bytes = print.as_encoded_bytes();
s.1
.write_all(bytes)