| Index: git_number.py
|
| diff --git a/git_number.py b/git_number.py
|
| index 7fa0398af775abfafa33caa1e803ffe508fcbf23..6997f51b3d0ffd6a21383949315ff7dbdcd6109d 100755
|
| --- a/git_number.py
|
| +++ b/git_number.py
|
| @@ -252,6 +252,13 @@ def main(): # pragma: no cover
|
| levels = [logging.ERROR, logging.INFO, logging.DEBUG]
|
| logging.basicConfig(level=levels[min(opts.verbose, len(levels) - 1)])
|
|
|
| + # 'git number' should only be used on bots.
|
| + if os.getenv('CHROME_HEADLESS') != '1':
|
| + logging.error("'git-number' is an infrastructure tool that is only "
|
| + "intended to be used internally by bots. Developers should "
|
| + "use the 'Cr-Commit-Position' value in the commit's message.")
|
| + return 1
|
| +
|
| try:
|
| if opts.reset:
|
| clear_caches(on_disk=True)
|
|
|