Skip to content

Commit dc30094

Browse files
committed
fix: exit with code 1 when yt-append-description fails
Add error exit code for bash error handling when video updates fail. Program now returns exit code 1 instead of 0 when any video fails to update (e.g., quota exceeded errors).
1 parent 98eb27b commit dc30094

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rust-yt-uploader"
3-
version = "0.2.16"
3+
version = "0.2.17"
44
edition = "2024"
55
rust-version = "1.89"
66
authors = ["Yang Ye <yy@runchee.com>"]

src/bin/yt_append_description.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,11 @@ async fn main() -> Result<()> {
192192
);
193193
}
194194

195+
// Exit with error code 1 if any video failed
196+
if error_count > 0 {
197+
anyhow::bail!("{} video(s) failed to update", error_count);
198+
}
199+
195200
Ok(())
196201
}
197202

0 commit comments

Comments
 (0)