Update CLI to handle multiple arguments#137
Closed
ChrisWard42 wants to merge 1 commit intoekalinin:masterfrom
Closed
Update CLI to handle multiple arguments#137ChrisWard42 wants to merge 1 commit intoekalinin:masterfrom
ChrisWard42 wants to merge 1 commit intoekalinin:masterfrom
Conversation
Owner
|
It looks like fixed in #132. |
Author
|
@ekalinin This issue is not fixed by the fix merged in #132 . Re-tested after you merged that PR to verify. That was specifically about the "--indent" flag not working, this is about the CLI not accepting multiple arguments in a single command, indent just happens to be the one used in the example. Against HEAD of main: Against my branch: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If specifying multiple arguments to the script, only the first argument is properly consumed, the others are treated as input files and generate errors such as:
The present CLI handler only looks at the first argument $1 before proceeding. This updates the handler to process all defined CLI arguments until it sees an argument that doesn't match, at which point it treats the rest as input files. This also includes the fix for the --indent argument that was outlined here: #132
Existing tests passed when run locally: