holepunchto / pear

combined Peer-to-Peer (P2P) Runtime, Development & Deployment tool
https://docs.pears.com/
Apache License 2.0
116 stars 11 forks source link

CLI `-h` prints help text twice #412

Closed lejeunerenard closed 2 weeks ago

lejeunerenard commented 3 weeks ago

Running pear.dev -h will output the following:

pear [flags] <cmd> rest

Arguments:
  <cmd>
  rest

Flags:
  -v                    Print version
  --log-level <level>   Level to log at. 0,1,2,3 (OFF,ERR,INF,TRC)
  --log-labels <list>   Labels to log (internal, always logged)
  --log-fields <list>   Show/hide: date,time,h:level,h:label,h:delta
  --log-stacks          Add a stack trace to each log message
  --log                 Label:sidecar Level:2 Fields: h:level,h:label
  --sidecar             Boot Sidecar
  --help|-h             Show help

Pear ~ Welcome to the Internet of Peers
🍐 v0.dev./Users/seanzellmer/pear

  pear [flags] [command]

  Flags:
    -v                    Print version
    --log-level <level>   Level to log at. 0,1,2,3 (OFF,ERR,INF,TRC)
    --log-labels <list>   Labels to log (internal, always logged)
    --log-fields <list>   Show/hide: date,time,h:level,h:label,h:delta
    --log-stacks          Add a stack trace to each log message
    --log                 Label:sidecar Level:2 Fields: h:level,h:label
    --sidecar             Boot Sidecar
    --help|-h             Show help

  Commands:
    init                  Create initial project files
    dev                   pear dev has been deprecated, use pear run --dev instead.
    stage                 Synchronize local changes to key
    seed                  Seed or reseed a project
    run                   Run an application from a key or dir
    release               Set production release version
    info                  Read project information
    dump                  Synchronize files from key to dir
    touch                 Create Pear link
    shift                 Advanced. Move storage between apps
    sidecar               Advanced. Run sidecar in terminal
    gc                    Advanced. Clear dangling resources
    versions              View dependency versions
    help                  View help for command

🍐 0.dev./Users/seanzellmer/pear
pears.com | holepunch.to | keet.io
Pear ~ Welcome to the IoP

The first help text print out is caused by the default help text printed by shell.js.

rafapaezbas commented 3 weeks ago

Fix proposal: https://github.com/holepunchto/pear/pull/424 https://github.com/holepunchto/paparam/pull/16

lejeunerenard commented 3 weeks ago

Looks good to me. Tested and works for me.

rafapaezbas commented 2 weeks ago

fix merged