Skip to content

Commit

Permalink
Use stderr for errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
koxu1996 committed Feb 6, 2024
1 parent e376530 commit 0dafb64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion kairos-cli/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fn main() {
println!("{}", output)
}
Err(error) => {
println!("{}", error);
eprintln!("{}", error);
process::exit(1);
}
}
Expand Down
6 changes: 3 additions & 3 deletions kairos-cli/tests/cli_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ fn deposit_invalid_amount() {
.arg(secret_key_path);
cmd.assert()
.failure()
.stdout("failed to parse 'amount' as u64\n");
.stderr("failed to parse 'amount' as u64\n");
}

#[test]
Expand All @@ -79,7 +79,7 @@ fn deposit_invalid_private_key_path() {
.arg(secret_key_path);
cmd.assert()
.failure()
.stdout("cryptography error: failed to parse private key\n");
.stderr("cryptography error: failed to parse private key\n");
}

#[test]
Expand All @@ -96,5 +96,5 @@ fn transfer_invalid_recipient() {
.arg(secret_key_path);
cmd.assert()
.failure()
.stdout("cryptography error: failed to serialize signature/key\n");
.stderr("cryptography error: failed to serialize signature/key\n");
}

0 comments on commit 0dafb64

Please sign in to comment.