Description
In \src/index.ts:49,68,76:
\\ s
staleDays: opts.staleDays ? parseInt(opts.staleDays, 10) : undefined,
\\
When the user passes a non-numeric value like --stale-days abc, \parseInt('abc', 10)\ returns \NaN. This \NaN\ is passed directly into the config object with no validation.
Impact
\NaN\ flows through the config into \getStaleBranches(NaN, cwd), which computes \cutoff.setDate(NaN)\ producing an Invalid Date. All comparisons against Invalid Date are \alse, so no branches are ever classified as stale. The tool silently ignores the invalid input instead of rejecting it with an error message.
Suggested Fix
Validate the result of \parseInt()\ and throw a user-friendly error if \isNaN()\ returns true.
Description
In \src/index.ts:49,68,76:
\\ s
staleDays: opts.staleDays ? parseInt(opts.staleDays, 10) : undefined,
\\
When the user passes a non-numeric value like --stale-days abc, \parseInt('abc', 10)\ returns \NaN. This \NaN\ is passed directly into the config object with no validation.
Impact
\NaN\ flows through the config into \getStaleBranches(NaN, cwd), which computes \cutoff.setDate(NaN)\ producing an Invalid Date. All comparisons against Invalid Date are \alse, so no branches are ever classified as stale. The tool silently ignores the invalid input instead of rejecting it with an error message.
Suggested Fix
Validate the result of \parseInt()\ and throw a user-friendly error if \isNaN()\ returns true.