ome / scc

OME tools for managing the Git(Hub) workflow
https://pypi.org/project/scc/
GNU General Public License v2.0
0 stars 15 forks source link

scc token: suggest help if no subcommand given #281

Closed joshmoore closed 1 year ago

joshmoore commented 1 year ago

Avoid a strange error if a user enters scc token by printing out a suggestion to use help. e.g.:

$ scc token
use -h to find a list of subcommands

This may need applying to other subcommands as well.

cc: @pwalczysko

original error:

/Users/pwalczysko/opt/anaconda3/envs/standup/bin/scc token
Traceback (most recent call last):
  File "/Users/pwalczysko/opt/anaconda3/envs/standup/lib/python3.6/site-packages/scc/main.py", line 86, in entry_point
    (BumpVersionConda.NAME, BumpVersionConda),
  File "/Users/pwalczysko/opt/anaconda3/envs/standup/lib/python3.6/site-packages/yaclifw/framework.py", line 188, in main
    ns.func(ns)
AttributeError: 'Namespace' object has no attribute 'func'
pwalczysko commented 1 year ago
pip install git+https://github.com/joshmoore/scc.git@missing-help
scc token                     
use -h to find a list of subcommands

Works as expected. Thank you

joshmoore commented 1 year ago

Works as expected and minimally silences a very weird error but I think moving forward we can do more extensive clean up here.