@harryisfish/gitt 1.6.3 → 1.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +3 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -86,11 +86,12 @@ async function main() {
86
86
  program
87
87
  .option('-i, --interactive', 'Interactive mode: Select branches to delete')
88
88
  .option('-d, --dry-run', 'Dry run: Show what would be deleted without deleting')
89
- .option('--stale [days]', 'Find stale branches (default: 90 days)', '90')
89
+ .option('--stale [days]', 'Find stale branches (default: 90 days)')
90
90
  .action(async (options) => {
91
91
  await checkGitRepo();
92
- const staleDays = options.stale === true ? 90 : parseInt(options.stale, 10);
92
+ // options.stale is undefined when not passed, true when passed without value, or a string when passed with value
93
93
  const isStale = options.stale !== undefined;
94
+ const staleDays = options.stale === true || options.stale === undefined ? 90 : parseInt(options.stale, 10);
94
95
  await (0, clean_1.cleanDeletedBranches)({
95
96
  interactive: options.interactive || false,
96
97
  dryRun: options.dryRun || false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harryisfish/gitt",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "description": "A command-line tool to help you manage Git repositories and remote repositories, such as keeping in sync, pushing, pulling, etc.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {