-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bindgen): Check for positional input of an array of files
Still todo: dynamic input indexing with multiple arguments. Also, cli11 currently does not distinguish between the end of a input array set of arguments and a positional output.
- Loading branch information
Showing
3 changed files
with
50 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
function inputArrayCheck(interfaceJson) { | ||
interfaceJson.inputs.forEach((input) => { | ||
const isArray = input.itemsExpectedMax > 1 | ||
if (isArray) { | ||
console.error('Positional multi-value inputs are currently not supported -- please use an option instead') | ||
console.error(`Violating option: ${input.name}`) | ||
process.exit(1) | ||
} | ||
}) | ||
} | ||
|
||
export default inputArrayCheck |
This file contains 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
This file contains 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