Skip to content

Commit

Permalink
Use group status to report exit code (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
oltrep committed Jan 28, 2022
1 parent c0eece4 commit 7a037d9
Show file tree
Hide file tree
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
Expand Up @@ -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))
Expand Down
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
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion src/tool_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use std::{
process,
};

use command_group::CommandGroup;
use semver::Version;
use serde::{Deserialize, Serialize};
use zip::ZipArchive;
Expand Down Expand Up @@ -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!(
Expand Down

0 comments on commit 7a037d9

Please sign in to comment.