-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix commander not parsing arguments #66
Conversation
Commander does not accept getting the options directly from program. Need to create options variable. Added this line (after .parse(process.argv) ): const options = program.opts(); And replace program by options thereafter.
Fix commander not parsing arguments
Commander does not accept getting the options directly from program. Need to create options variable. Added this line (after .parse(process.argv) ): const options = program.opts(); And replace program by options thereafter.
dynamoDBtoCSV.js
Outdated
console.log("You must specify a table"); | ||
program.outputHelp(); | ||
options.outputHelp(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that's correct. options is doesn't have an outputHelp method. it's a program.OptionValue
good point. Any other?
…On Mon, 29 Mar 2021 at 15:25, Erik Dasque ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In dynamoDBtoCSV.js
<#66 (comment)>:
> console.log("You must specify a table");
- program.outputHelp();
+ options.outputHelp();
I don't think that's correct. options is doesn't have an outputHelp
method. it's a program.OptionValue
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#66 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADCUFVK4PKJD2WOYN2VHK3LTGDH4LANCNFSM42AE5TDA>
.
|
Add ProjectionExpression: options.select to the ScanQuery to fix --select not selecting specific fields if no primary key is presented.
It took some time for me to figure out what was going on and to fix this error. I was going to open a PR exactly like this one when I saw it already has been made. I wish this PR has been merged before :( |
This should be merged into the main branch. I had the same issue and using the code in this branch worked |
Why has this not been merged yet? This project is not functional without this. UPDATE: This seems now out of date. Merging it locally fails with this error:
|
Commander does not accept getting the options directly from program.
Need to create options variable.
Added this line (after .parse(process.argv) ):
const options = program.opts();
And replace program by options thereafter.