Skip to content

Commit

Permalink
Use group status to report exit code (#41)
Browse files Browse the repository at this point in the history
oltrep authored Jan 28, 2022
1 parent c0eece4 commit 7a037d9
Showing 4 changed files with 54 additions and 18 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@

## Unreleased Changes

- Report correct exit code ([#41](https://github.com/Roblox/foreman/pull/41))
- Improve error handling to reduces crashes and add more useful error messages ([#40](https://github.com/Roblox/foreman/pull/40))
- Add environment variable to override Foreman home directory ([#39](https://github.com/Roblox/foreman/pull/39))
- Support tools hosted on GitLab ([#31](https://github.com/Roblox/foreman/pull/31))
67 changes: 50 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
command-group = "1.0.8"
dirs = "4.0.0"
env_logger = "0.9.0"
log = "0.4.14"
3 changes: 2 additions & 1 deletion src/tool_cache.rs
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@ use std::{
process,
};

use command_group::CommandGroup;
use semver::Version;
use serde::{Deserialize, Serialize};
use zip::ZipArchive;
@@ -36,7 +37,7 @@ impl ToolCache {

let status = process::Command::new(&tool_path)
.args(args)
.status()
.group_status()
.map_err(|err| {
ForemanError::io_error_with_context(err,
format!(

0 comments on commit 7a037d9

Please sign in to comment.