Skip to content

Commit

Permalink
Conditional Unix use
Browse files Browse the repository at this point in the history
  • Loading branch information
allan2 committed Sep 8, 2024
1 parent 5b4313a commit 23aade4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dotenvy/src/bin/dotenvy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => ({
Expand Down Expand Up @@ -93,6 +93,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
Err(e) => die!("fatal: {e}"),
};
} else {
use std::os::unix::process::CommandExt;
die!("fatal: {}", cmd.exec());
};
}

0 comments on commit 23aade4

Please sign in to comment.