diff --git a/cuddle_cli/src/actions/shell.rs b/cuddle_cli/src/actions/shell.rs index cf1631f..41d4e56 100644 --- a/cuddle_cli/src/actions/shell.rs +++ b/cuddle_cli/src/actions/shell.rs @@ -39,7 +39,7 @@ Starting running shell action: {} let current_dir = current_dir()?; log::trace!("current executable dir={}", current_dir.to_string_lossy()); - let mut process = Command::new(path) + let mut process = Command::new(path.clone()) .current_dir(current_dir) .envs(variables.iter().map(|v| { log::trace!("{:?}", v); @@ -55,7 +55,12 @@ Starting running shell action: {} log::warn!("process exited without code") } Some(n) => { - log::info!("process exited with code: {}", n) + log::info!("process exited with code: {}", n); + return Err(anyhow::anyhow!( + "{} exited with: {}", + path.clone().to_string_lossy(), + n + )); } } diff --git a/templates/build_cuddle_image.Dockerfile b/templates/build_cuddle_image.Dockerfile index 5cd1323..04915f2 100644 --- a/templates/build_cuddle_image.Dockerfile +++ b/templates/build_cuddle_image.Dockerfile @@ -22,4 +22,3 @@ FROM docker:stable-dind COPY --from=base /usr/local/cargo/bin/ /usr/local/cargo/bin/ ENV PATH="${PATH}:/usr/local/cargo/bin" -