diff options
Diffstat (limited to 'libs/nak/src')
| -rw-r--r-- | libs/nak/src/runtime_wrap.rs | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/libs/nak/src/runtime_wrap.rs b/libs/nak/src/runtime_wrap.rs index 69f693e..37980d3 100644 --- a/libs/nak/src/runtime_wrap.rs +++ b/libs/nak/src/runtime_wrap.rs @@ -1,38 +1,11 @@ -use std::env; use std::ffi::OsStr; use std::process::Command; -fn env_flag(name: &str) -> bool { - matches!( - env::var(name) - .unwrap_or_default() - .trim() - .to_ascii_lowercase() - .as_str(), - "1" | "true" | "yes" | "on" - ) -} - -pub fn use_steam_run() -> bool { - env_flag("NAK_USE_STEAM_RUN") -} - /// Build a command to run `exe` with the given environment variables. -/// -/// In steam-run mode, the command is wrapped with `steam-run`. -/// Otherwise the command runs directly. pub fn build_command<S: AsRef<OsStr>>( exe: impl AsRef<OsStr>, envs: &[(&str, S)], ) -> Command { - if use_steam_run() { - let mut cmd = Command::new("steam-run"); - cmd.arg(exe.as_ref()); - for (key, value) in envs { - cmd.env(key, value.as_ref()); - } - return cmd; - } let mut cmd = Command::new(exe); for (key, value) in envs { cmd.env(key, value.as_ref()); |
