cli.table unable to have both --csv and --no-header flags.
Closed this issue · 1 comments
tlee32 commented
OS: MacOS
cli-ux: 5.5.0
node: v13.11.0
I get the following error when I try to pass in both --csv and --no-header flags to a command that uses cli.table:
./bin/run --no-header --csv
› Error: --csv= cannot also be provided when using --no-header=
Note: ./bin/run --output=csv --no-header
works.
Steps to Reproduce
Copy / Paste the script below as a command:
const {Command, flags} = require('@oclif/command')
const { cli } = require('cli-ux')
class TestCommand extends Command {
async run() {
cli.table([{version:'1.0.0'}], {version:{}}, flags)
}
}
TestCommand.description = `Describe the command here
...
Extra documentation goes here
`
TestCommand.flags = {
// add flags from cli.table
...cli.table.flags()
}
module.exports = TestCommand
Run: ./bin/run --no-header --csv
Related PR
#124
It seems like we just need to take out 'csv' from this line?