CLI: translate --jobs 0 is refused instead of translating nothing #332

Open
github-bot wants to merge 1 commit from github-bot/gh-332 into main AGit
Owner

@⁠RenzoWit35 on GitHub · 2026-11-24 23:34 UTC · original
RenzoWit35:fix/249-translate-jobs-zero → main · +25 −2 · 1 files · 1 commits · open

Fixes #249.

--jobs 0 started no workers and reported zero containers. The option now parses as
NonZeroUsize, so 0 fails with an argument error ("number would be zero for non-zero type")
before any scanning.

Test translate_jobs_must_be_at_least_one: 0 is a ValueValidation error; 1 and no option
parse.

Testing

On Windows 11, MSVC Rust 1.98.1, branch alone on top of main (2119b0e): cargo clippy --workspace --all-targets --locked -- -D warnings, the same with --all-features, and cargo test --workspace --locked all pass. The new regression test fails on main and passes here. All nine fix branches for #242-#250 also pass together when merged.

🤖 Generated with Claude Code

**@⁠RenzoWit35** on GitHub · 2026-11-24 23:34 UTC · [original](https://github.com/fxceless/victory-fork/pull/332) `RenzoWit35:fix/249-translate-jobs-zero` → `main` · +25 −2 · 1 files · 1 commits · open Fixes #249. `--jobs 0` started no workers and reported zero containers. The option now parses as `NonZeroUsize`, so 0 fails with an argument error ("number would be zero for non-zero type") before any scanning. Test `translate_jobs_must_be_at_least_one`: 0 is a `ValueValidation` error; 1 and no option parse. ## Testing On Windows 11, MSVC Rust 1.98.1, branch alone on top of `main` (2119b0e): `cargo clippy --workspace --all-targets --locked -- -D warnings`, the same with `--all-features`, and `cargo test --workspace --locked` all pass. The new regression test fails on `main` and passes here. All nine fix branches for #242-#250 also pass together when merged. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The worker count was used as given, so --jobs 0 started no workers and the
command reported zero containers as if there were none. The option now
parses as a non-zero count, and 0 fails with an argument error before any
scanning. A test parses 0, 1 and no --jobs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:40:55 +00:00
Author
Owner

@⁠kaayzouee on GitHub · 2026-11-25 01:09 UTC · original

Duplicate of #290?

**@⁠kaayzouee** on GitHub · 2026-11-25 01:09 UTC · [original](https://github.com/fxceless/victory-fork/pull/332#issuecomment-7149263159) Duplicate of #290?
github-bot force-pushed github-bot/gh-332 from 424ff95378 to 7f7c497172 2026-11-26 16:29:01 +00:00 Compare
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/332/head:github-bot/gh-332'
git switch 'github-bot/gh-332'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-332'
git switch 'github-bot/gh-332'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-332'
git switch 'github-bot/gh-332'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-332'
git switch 'main'
git merge --squash 'github-bot/gh-332'
git switch 'main'
git merge --ff-only 'github-bot/gh-332'
git switch 'main'
git merge 'github-bot/gh-332'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.