diff --git a/macro/src/pipe.rs b/macro/src/pipe.rs index ca1853f..5e71087 100644 --- a/macro/src/pipe.rs +++ b/macro/src/pipe.rs @@ -90,7 +90,7 @@ impl ToTokens for Pipe { if !_output.status.success() { return Err(::comlexr::ExecutorError::FailedCommand{ - command: #prev_com_ident, + command: std::boxed::Box::new(#prev_com_ident), exit_code: _output.status.code().unwrap_or(1), }); } diff --git a/src/pipe.rs b/src/pipe.rs index b99d393..a14dbdf 100644 --- a/src/pipe.rs +++ b/src/pipe.rs @@ -24,7 +24,10 @@ pub enum ExecutorError { .collect::>() .join(" "), )] - FailedCommand { command: Command, exit_code: i32 }, + FailedCommand { + command: Box, + exit_code: i32, + }, /// No stdin Error #[error("Unable to get mutable stdin")]