From 23aade4f4edbb4c7a380a094ad7b334e78565088 Mon Sep 17 00:00:00 2001 From: Allan <6740989+allan2@users.noreply.github.com> Date: Sun, 8 Sep 2024 16:40:04 -0400 Subject: [PATCH] Conditional Unix `use` --- dotenvy/src/bin/dotenvy.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dotenvy/src/bin/dotenvy.rs b/dotenvy/src/bin/dotenvy.rs index a4ba9c3a..be0a351f 100644 --- a/dotenvy/src/bin/dotenvy.rs +++ b/dotenvy/src/bin/dotenvy.rs @@ -11,7 +11,7 @@ //! will output `bar`. use clap::{Parser, Subcommand}; use dotenvy::{EnvLoader, EnvSequence}; -use std::{error, fs::File, io::ErrorKind, os::unix::process::CommandExt, path::PathBuf, process}; +use std::{error, fs::File, io::ErrorKind, path::PathBuf, process}; macro_rules! die { ($fmt:expr) => ({ @@ -93,6 +93,7 @@ fn main() -> Result<(), Box> { Err(e) => die!("fatal: {e}"), }; } else { + use std::os::unix::process::CommandExt; die!("fatal: {}", cmd.exec()); }; }