GMOD / jbrowse-components

Source code for JBrowse 2, a modern React-based genome browser
https://jbrowse.org/jb2
Apache License 2.0
205 stars 61 forks source link

Using jbrowse CLI with no args passed to e.g. add-track produces confusing message with stack trace #4575

Open cmdcolin opened 1 week ago

cmdcolin commented 1 week ago

example session

jbrowse add-track
/home/cdiesh/.fnm/node-versions/v22.8.0/installation/lib/node_modules/@jbrowse/cli/node_modules/@oclif/core/lib/parser/validate.js:46
            throw new errors_1.RequiredArgsError({
                  ^

RequiredArgsError: Missing 1 required arg:
track  Track file or URL
See more help with --help
    at validateArgs (/home/cdiesh/.fnm/node-versions/v22.8.0/installation/lib/node_modules/@jbrowse/cli/node_modules/@oclif/core/lib/parser/validate.js:46:19)
    at validate (/home/cdiesh/.fnm/node-versions/v22.8.0/installation/lib/node_modules/@jbrowse/cli/node_modules/@oclif/core/lib/parser/validate.js:190:5)
    at Object.parse (/home/cdiesh/.fnm/node-versions/v22.8.0/installation/lib/node_modules/@jbrowse/cli/node_modules/@oclif/core/lib/parser/index.js:20:35)
    at async AddTrack.parse (/home/cdiesh/.fnm/node-versions/v22.8.0/installation/lib/node_modules/@jbrowse/cli/node_modules/@oclif/core/lib/command.js:243:25)
    at async AddTrack.run (/home/cdiesh/.fnm/node-versions/v22.8.0/installation/lib/node_modules/@jbrowse/cli/lib/commands/add-track.js:61:52)
    at async AddTrack._run (/home/cdiesh/.fnm/node-versions/v22.8.0/installation/lib/node_modules/@jbrowse/cli/node_modules/@oclif/core/lib/command.js:301:22)
    at async Config.runCommand (/home/cdiesh/.fnm/node-versions/v22.8.0/installation/lib/node_modules/@jbrowse/cli/node_modules/@oclif/core/lib/config/config.js:424:25)
    at async Object.run (/home/cdiesh/.fnm/node-versions/v22.8.0/installation/lib/node_modules/@jbrowse/cli/node_modules/@oclif/core/lib/main.js:95:16) {
  code: undefined,
  oclif: { exit: 2 },
  skipOclifErrorHandling: undefined,
  suggestions: undefined,
  parse: {
    input: {
      '--': undefined,
      args: {
        track: {
          parse: [AsyncFunction: parse],
          required: true,
          description: 'Track file or URL',
          input: [],
          type: 'option',
          name: 'track'
        }
      },
      argv: [],
      context: AddTrack {

... continues for another 1000 lines...

should probably just print help and nothing else