Skip to content

Commit

Permalink
Print stderr always
Browse files Browse the repository at this point in the history
Signed-off-by: Danil <[email protected]>
  • Loading branch information
Deniallugo committed Jul 10, 2024
1 parent 529df72 commit f429d33
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci-zk-toolbox-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,18 @@ jobs:
echo $(pwd)/bin >> $GITHUB_PATH
echo IN_DOCKER=1 >> .env
- name: Start services
run: |
ci_localnet_up
ci_run sccache --start-server
- name: Initialize ecosystem
run: |
ci_run git config --global --add safe.directory /usr/src/zksync
ci_run git config --global --add safe.directory /usr/src/zksync/contracts/system-contracts
ci_run git config --global --add safe.directory /usr/src/zksync/contracts
ci_run zk_inception ecosystem init --deploy-paymaster --deploy-erc20 \
--deploy-ecosystem --l1-rpc-url=http://reth:8545 \
--server-db-url=postgres://postgres:notsecurepassword@postgres:5432 \
Expand Down
10 changes: 8 additions & 2 deletions zk_toolbox/crates/common/src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,13 @@ impl<'a> Cmd<'a> {
let output = if global_config().verbose || self.force_run {
logger::debug(format!("Running: {}", self.inner));
logger::new_empty_line();
run_low_level_process_command(self.inner.into())?
let output = run_low_level_process_command(self.inner.into())?;
if let Ok(data) = String::from_utf8(output.stderr.clone()) {
if !data.is_empty() {
logger::info(data)
}
}
output
} else {
// Command will be logged manually.
self.inner.set_quiet(true);
Expand Down Expand Up @@ -148,7 +154,7 @@ fn check_output_status(command_text: &str, output: &std::process::Output) -> Cmd

fn run_low_level_process_command(mut command: Command) -> io::Result<Output> {
command.stdout(Stdio::inherit());
command.stderr(Stdio::inherit());
command.stderr(Stdio::piped());
let child = command.spawn()?;
child.wait_with_output()
}
Expand Down

0 comments on commit f429d33

Please sign in to comment.