flowey_lib_common/_util/
mod.rs1pub use flowey::util::copy_dir_all;
5
6use flowey::node::prelude::FlowPlatformKind;
7use flowey::node::prelude::RustRuntimeServices;
8
9pub mod cargo_output;
10pub mod extract;
11pub mod wslpath;
12
13pub fn running_in_wsl(_rt: &mut RustRuntimeServices<'_>) -> bool {
16 let Ok(output) = std::process::Command::new("wslpath")
17 .args(["-aw", "/"])
18 .output()
19 else {
20 return false;
21 };
22 String::from_utf8_lossy(&output.stdout).starts_with(r"\\wsl.localhost")
23}
24
25pub fn bsdtar_name(rt: &mut RustRuntimeServices<'_>) -> &'static str {
29 match rt.platform().kind() {
30 FlowPlatformKind::Windows => "tar.exe",
31 FlowPlatformKind::Unix => "bsdtar",
32 }
33}