Skip to content

Commit 0bdd6ef

Browse files
committed
Fixed error
1 parent ff3d105 commit 0bdd6ef

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

.github/workflows/test.yml

-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ jobs:
5050
steps:
5151
- name: Checkout sources
5252
uses: actions/checkout@v3
53-
with:
54-
submodules: true
5553

5654
- name: Install stable toolchain
5755
uses: actions-rs/toolchain@v1

src/main.rs

+13-9
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@ fn write_outputs(
1616
println!("Parsing outputs...");
1717
}
1818
let json: serde_json::Value = match serde_json::from_str(output) {
19-
Ok(json) => json,
19+
Ok(json) => {
20+
if *verbose {
21+
println!("Outputs parsed successfully.");
22+
}
23+
json
24+
}
2025
Err(e) => {
2126
eprintln!("Error parsing output: {}", e);
2227
std::process::exit(1);
2328
}
2429
};
25-
if *verbose {
26-
println!("Parsed outputs.");
27-
}
2830

2931
// Create the output directory if it doesn't exist
3032
if !output_directory.exists() {
@@ -33,7 +35,11 @@ fn write_outputs(
3335
}
3436

3537
match std::fs::create_dir_all(output_directory) {
36-
Ok(_) => (),
38+
Ok(_) => {
39+
if *verbose {
40+
println!("Output directory created successfully.");
41+
}
42+
}
3743
Err(e) => {
3844
eprintln!(
3945
"Error creating output directory '{}': {}",
@@ -43,10 +49,8 @@ fn write_outputs(
4349
std::process::exit(1);
4450
}
4551
}
46-
} else {
47-
if *verbose {
48-
println!("Output directory already exists.");
49-
}
52+
} else if *verbose {
53+
println!("Output directory already exists.");
5054
}
5155

5256
for key in keys {

0 commit comments

Comments
 (0)