Skip to content

CLI: repeating --input only processes the last file #119

Description

@Shinrai

Problem

Passing --input more than once processes only the last value, and nothing says the earlier ones were dropped.

Reproduced on @cldmv/fix-headers@2.1.3 in a fresh git project with two header-less files:

npx fix-headers --input a.mjs --input b.mjs --verbose
# fix-headers complete: scanned=1, updated=1, dryRun=false
# updated: b.mjs

a.mjs is left untouched and scanned=1. The obvious way to stamp just the files a change touched quietly skips all but the last one, so a header can be missing from a commit with no warning.

Fix

Make --input repeatable and process the union of every value given, in any order, with duplicates dropped. Folders should work as well as single files. If repeating it is deliberately unsupported, reject repeated --input with a clear error instead of silently keeping the last one. Add a CLI test for two --input files.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: cliTouches CLI / executable / bin entry pointspriority: mediumShould be addressed in the normal course of developmentstatus: implementedBuilt and deployed, but not yet fully tested/verifiedtype: bugSomething is broken or not behaving as expected

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions