Skip to content

Commit

Permalink
Merge pull request #48 from software-mansion/piotmag769-patch-1
Browse files Browse the repository at this point in the history
Errors to stderr
  • Loading branch information
piotmag769 authored Jun 28, 2024
2 parents f8acc83 + 15abd93 commit 2e0a469
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ enum Commands {

fn print_error_message(error: &Error) {
let error_tag = style("ERROR").red();
println!("[{error_tag}] {error}");
eprintln!("[{error_tag}] {error}");
}

fn read_json(file_path: PathBuf) -> Result<Value> {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/compile_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ fn wrong_json() {
let temp_dir = temp_dir_with_sierra_file("", sierra_file_name);
let snapbox = runner(args, &temp_dir);

snapbox.assert().failure().stdout_eq(indoc! {r"
snapbox.assert().failure().stderr_eq(indoc! {r"
[ERROR] Unable to read sierra_program. Make sure it is an array of felts
"});
}
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/compile_raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ fn wrong_json() {
let temp_dir = temp_dir_with_sierra_file("", sierra_file_name);
let snapbox = runner(args, &temp_dir);

snapbox.assert().failure().stdout_eq(indoc! {r"
snapbox.assert().failure().stderr_eq(indoc! {r"
[ERROR] Unable to deserialize Sierra program. Make sure it is in a correct format
"});
}
Expand Down

0 comments on commit 2e0a469

Please sign in to comment.