Skip to content

Commit 70ece9f

Browse files
bors[bot]Michael-F-Bryanfschutt
authored
Merge #3361
3361: Give users feedback when they are running "wasmer add ..." r=fschutt a=Michael-F-Bryan Fixes #3350. Co-authored-by: Michael-F-Bryan <michael@wasmer.io> Co-authored-by: Felix Schütt <12084016+fschutt@users.noreply.github.com>
2 parents 2b49d1b + 0d17535 commit 70ece9f

1 file changed

Lines changed: 12 additions & 16 deletions

File tree

lib/cli/src/commands/add.rs

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,30 +41,26 @@ impl Add {
4141
let bindings = self.lookup_bindings(&registry)?;
4242

4343
let mut cmd = self.target()?.command(&bindings)?;
44+
cmd.stdin(Stdio::null())
45+
.stdout(Stdio::inherit())
46+
.stderr(Stdio::inherit());
4447

45-
#[cfg(feature = "debug")]
46-
log::debug!("Running {cmd:?}");
47-
48-
let status = cmd
49-
.stdin(Stdio::null())
50-
.stdout(Stdio::piped())
51-
.stderr(Stdio::piped())
52-
.status()
53-
.with_context(|| {
54-
format!(
55-
"Unable to start \"{:?}\". Is it installed?",
56-
cmd.get_program()
57-
)
58-
})?;
48+
println!("Running: {cmd:?}");
49+
50+
let status = cmd.status().with_context(|| {
51+
format!(
52+
"Unable to start \"{:?}\". Is it installed?",
53+
cmd.get_program()
54+
)
55+
})?;
5956

6057
anyhow::ensure!(status.success(), "Command failed: {:?}", cmd);
6158

6259
Ok(())
6360
}
6461

6562
fn lookup_bindings(&self, registry: &str) -> Result<Vec<Bindings>, Error> {
66-
#[cfg(feature = "debug")]
67-
log::debug!("Querying WAPM for the bindings packages");
63+
println!("Querying WAPM for package bindings");
6864

6965
let mut bindings_to_add = Vec::new();
7066
let language = self.target()?.language();

0 commit comments

Comments
 (0)