Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
fix(gen): preserve interactive terminal when checking git
Browse files Browse the repository at this point in the history
Signed-off-by: Brooks Townsend <brooks@cosmonic.com>
  • Loading branch information
brooksmtownsend committed Jul 27, 2023
1 parent 3fe9572 commit b0e746b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wash-cli"
version = "0.19.0"
version = "0.19.1"
authors = ["wasmCloud Team"]
categories = ["wasm", "command-line-utilities"]
description = "wasmcloud Shell (wash) CLI tool"
Expand Down
2 changes: 1 addition & 1 deletion crates/wash-lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wash-lib"
version = "0.9.2"
version = "0.9.3"
authors = ["wasmCloud Team"]
categories = ["wasm", "wasmcloud"]
description = "wasmcloud Shell (wash) libraries"
Expand Down
8 changes: 7 additions & 1 deletion crates/wash-lib/src/generate/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,13 @@ fn validate(project: &Project) -> Result<()> {
}

if project.git.is_some() || !project.no_git_init {
if let Err(err) = Command::new("git").args(["version"]).spawn() {
if let Err(err) = std::process::Command::new("git")
.args(["version"])
.stdin(Stdio::null())
.stdout(Stdio::null())
.stderr(Stdio::null())
.output()
{
if err.kind() == ErrorKind::NotFound {
return Err(anyhow!(
"Error in 'new {}' options: required 'git' to be installed in PATH",
Expand Down

0 comments on commit b0e746b

Please sign in to comment.