Skip to content

Commit 7b1be0a

Browse files
committed
fix cmd msg hints
1 parent d028d64 commit 7b1be0a

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "chaindev"
3-
version = "0.54.0"
3+
version = "0.54.1"
44
edition = "2024"
55
authors = ["[email protected]"]
66
description = "Powerful development and testing utils for blockchain developers."

src/beacon_based/dev.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,7 +1215,6 @@ fn check_port(port: u16) -> Result<()> {
12151215
}
12161216

12171217
fn exec_spawn(cmd: &str) -> Result<()> {
1218-
let cmd = format!("ulimit -n 102400; {}", cmd);
12191218
Command::new("bash")
12201219
.arg("-c")
12211220
.arg(cmd)
@@ -1226,7 +1225,12 @@ fn exec_spawn(cmd: &str) -> Result<()> {
12261225
.c(d!())?
12271226
.wait()
12281227
.c(d!())
1229-
.map(|exit_status| println!("{}", exit_status))
1228+
.map(|exit_status| {
1229+
if !exit_status.success() {
1230+
print_msg!("{}", cmd);
1231+
println!("{exit_status}");
1232+
}
1233+
})
12301234
}
12311235

12321236
#[derive(Debug, Serialize, Deserialize)]

src/common/remote.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ impl<'a> From<&'a Host> for Remote<'a> {
3535
impl Remote<'_> {
3636
// Execute a cmd on a remote host and get its outputs
3737
pub fn exec_cmd(&self, cmd: &str) -> Result<String> {
38-
let cmd = format!("ulimit -n 100000 >/dev/null 2>&1;{}", cmd);
3938
self.inner
40-
.exec_cmd(&cmd)
39+
.exec_cmd(cmd)
4140
.c(d!(cmd))
4241
.map(|c| String::from_utf8_lossy(&c).into_owned())
4342
}

src/tendermint_based/dev.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,6 @@ fn check_port(port: u16) -> Result<()> {
10171017
}
10181018

10191019
fn exec_spawn(cmd: &str) -> Result<()> {
1020-
let cmd = format!("ulimit -n 102400; {}", cmd);
10211020
Command::new("bash")
10221021
.arg("-c")
10231022
.arg(cmd)
@@ -1028,7 +1027,12 @@ fn exec_spawn(cmd: &str) -> Result<()> {
10281027
.c(d!())?
10291028
.wait()
10301029
.c(d!())
1031-
.map(|exit_status| println!("{}", exit_status))
1030+
.map(|exit_status| {
1031+
if !exit_status.success() {
1032+
print_msg!("{}", cmd);
1033+
println!("{exit_status}");
1034+
}
1035+
})
10321036
}
10331037

10341038
#[derive(Debug, Serialize, Deserialize)]

0 commit comments

Comments
 (0)