diff options
| author | Trond Norbye <trond.norbye@gmail.com> | 2011-01-03 11:35:15 +0100 |
|---|---|---|
| committer | Shawn O. Pearce <sop@google.com> | 2011-01-09 16:10:04 -0800 |
| commit | d3fd537ea59272e2141ccee839400a93c0196e36 (patch) | |
| tree | ce2bcfcaf355fe4f955ca513241890be3393c9c1 | |
| parent | 0048b69c038306fe74408a63cdd0773b0d86a8fe (diff) | |
| download | git-repo-d3fd537ea59272e2141ccee839400a93c0196e36.tar.gz | |
Exit with statuscode 0 for repo help init
The complete help text is printed, so the program executed successfully.
Some tools (like OpenGrok) detects the availibility of a program by
running it with a known set of options and check the return code.
It is an easy and portable way of checking for the existence of a program
instead of searching the path (and handle extensions) ourselves.
Change-Id: Ic13428c77be4a36d599ccb8c86d893308818eae3
| -rwxr-xr-x | repo | 1 |
1 files changed, 1 insertions, 0 deletions
| @@ -479,6 +479,7 @@ def _Help(args): | |||
| 479 | if args: | 479 | if args: |
| 480 | if args[0] == 'init': | 480 | if args[0] == 'init': |
| 481 | init_optparse.print_help() | 481 | init_optparse.print_help() |
| 482 | sys.exit(0) | ||
| 482 | else: | 483 | else: |
| 483 | print >>sys.stderr,\ | 484 | print >>sys.stderr,\ |
| 484 | "error: '%s' is not a bootstrap command.\n"\ | 485 | "error: '%s' is not a bootstrap command.\n"\ |
