Closed bingozhu0197 closed 2 years ago
PLEASE DO NOT USE ISSUE TRACKER TO ASK QUESTIONS: see contributing
Describe the bug
def task_with_flag(): def _task(flag): print("Flag {0}".format("On" if flag else "Off"))
return { 'params': [{ 'name': 'flag', 'long': 'flagon', 'short': 'f', 'type': bool, 'default': False, 'inverse': 'flagoff'}], 'actions': [(_task, )], 'verbosity': 2 }
$ doit with_flag --flagoff . with_flag Flag Off
Environment
Looks like the expected output to me.
PLEASE DO NOT USE ISSUE TRACKER TO ASK QUESTIONS: see contributing
Describe the bug
def task_with_flag(): def _task(flag): print("Flag {0}".format("On" if flag else "Off"))
$ doit with_flag --flagoff . with_flag Flag Off
Environment