From 327f7418a02396b6b3290c6637a25f164cf121ec Mon Sep 17 00:00:00 2001 From: Stephen D <webmaster@scd31.com> Date: Wed, 15 Jan 2025 21:30:53 -0500 Subject: [PATCH] preserve exit code --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 441218a..16a80cd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10,7 +10,7 @@ checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" [[package]] name = "cargo-gg" -version = "0.1.0" +version = "0.1.1" dependencies = [ "anyhow", ] diff --git a/Cargo.toml b/Cargo.toml index ed6d11c..0a41878 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo-gg" -version = "0.1.0" +version = "0.1.1" edition = "2021" repository = "https://gitlab.scd31.com/stephen/cargo-gg" license = "MIT" diff --git a/src/main.rs b/src/main.rs index 7691ff1..a247650 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,8 @@ -use std::{env, fs::File, process::Command}; +use std::{ + env, + fs::File, + process::{exit, Command}, +}; fn main() -> anyhow::Result<()> { let mut arg_iter = env::args().peekable(); @@ -28,5 +32,5 @@ fn main() -> anyhow::Result<()> { let _ = File::create(path); } - Ok(()) + exit(code); } -- GitLab