Skip to content

Commit

Permalink
Merge #61
Browse files Browse the repository at this point in the history
61: fix run ignoring stdin r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
  • Loading branch information
bors[bot] and matklad authored Dec 14, 2022
2 parents 2118d3a + ca9a6d6 commit af75dd4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.2.3

- Fix bug where `Cmd::run` would ignore specified stdin.

## 0.2.2

- Add `Shell::path_exists`.
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "xshell"
description = "Utilities for quick shell scripting in Rust"
categories = ["development-tools::build-utils", "filesystem"]
version = "0.2.2" # also update xshell-macros/Cargo.toml and CHANGELOG.md
version = "0.2.3" # also update xshell-macros/Cargo.toml and CHANGELOG.md
license = "MIT OR Apache-2.0"
repository = "https://github.com/matklad/xshell"
authors = ["Aleksey Kladov <aleksey.kladov@gmail.com>"]
Expand All @@ -14,7 +14,7 @@ exclude = [".github/", "bors.toml", "rustfmt.toml", "cbench", "mock_bin/"]
[workspace]

[dependencies]
xshell-macros = { version = "=0.2.2", path = "./xshell-macros" }
xshell-macros = { version = "=0.2.3", path = "./xshell-macros" }

[dev-dependencies]
anyhow = "1.0.56"
5 changes: 1 addition & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -960,10 +960,7 @@ impl<'a> Cmd<'a> {
if !self.data.quiet {
eprintln!("$ {}", self);
}
let mut command = self.to_command();
let status = command.status().map_err(|err| Error::new_cmd_io(self, err))?;
self.check_status(status)?;
Ok(())
self.output_impl(false, false).map(|_| ())
}

/// Run the command and return its stdout as a string.
Expand Down
2 changes: 1 addition & 1 deletion xshell-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "xshell-macros"
description = "Private implementation detail of xshell crate"
version = "0.2.2"
version = "0.2.3"
license = "MIT OR Apache-2.0"
repository = "https://github.com/matklad/xshell"
authors = ["Aleksey Kladov <aleksey.kladov@gmail.com>"]
Expand Down

0 comments on commit af75dd4

Please sign in to comment.