CODAIT / magicat

๐Ÿง™๐Ÿ˜บ magicat - Deep learning magic.. with the convenience of cat!
Apache License 2.0
26 stars 5 forks source link

help! help is broken #4

Closed ptitzler closed 5 years ago

ptitzler commented 5 years ago
$ magicat --version
1.5.2

OK, but note the help option.

$ magicat

๐Ÿง™๐Ÿ˜บ magicat

  A Deep Learning powered CLI utility for identifying the contents of image     
  files. Your very own command-line crystal ball ๐Ÿ”ฎ.                             

Synopsis

  $ magicat <file> [--command]      
  $ magicat <directory> [--command] 
  $ magicat [help | -h]           

FAIL (notice --help syntax, no help output and [boolean] output)

$ magicat help
Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                         [boolean]

FAIL (notice --help syntax, no help output and [boolean] output)

$ magicat --help
Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                         [boolean]

OK.

$ mahgicat -h
-bash: mahgicat: command not found
bigmac:think patti$ magicat -h

๐Ÿง™๐Ÿ˜บ magicat

  A Deep Learning powered CLI utility for identifying the contents of image     
  files. Your very own command-line crystal ball ๐Ÿ”ฎ.                             

Synopsis

  $ magicat <file> [--command]      
  $ magicat <directory> [--command] 
  $ magicat [help | -h]             
kastentx commented 5 years ago

Initially I thought this was a limitation of Node.js, since the '--help' flag seems to be caught by the runtime before I have a chance to process it in my app.

I did some digging though and found that it works in create-react-app, for example. They use a library called commander to process the command line arguments so I hoping that this can be fixed by migrating to that.