@@ -124,7 +124,7 @@ if not REPO_REV:
124
124
BUG_URL = "https://issues.gerritcodereview.com/issues/new?component=1370071"
125
125
126
126
# increment this whenever we make important changes to this script
127
- VERSION = (2 , 48 )
127
+ VERSION = (2 , 50 )
128
128
129
129
# increment this if the MAINTAINER_KEYS block is modified
130
130
KEYRING_VERSION = (2 , 3 )
@@ -1335,10 +1335,11 @@ def _Help(args):
1335
1335
1336
1336
def _Version ():
1337
1337
"""Show version information."""
1338
+ git_version = ParseGitVersion ()
1338
1339
print ("<repo not installed>" )
1339
1340
print (f"repo launcher version { '.' .join (str (x ) for x in VERSION )} " )
1340
1341
print (f" (from { __file__ } )" )
1341
- print (f"git { ParseGitVersion () .full } " )
1342
+ print (f"git { git_version .full } " if git_version else "git not installed " )
1342
1343
print (f"Python { sys .version } " )
1343
1344
uname = platform .uname ()
1344
1345
print (f"OS { uname .system } { uname .release } ({ uname .version } )" )
@@ -1371,11 +1372,11 @@ def _RunSelf(wrapper_path):
1371
1372
my_main = os .path .join (my_dir , "main.py" )
1372
1373
my_git = os .path .join (my_dir , ".git" )
1373
1374
1374
- if os .path .isfile (my_main ) and os . path . isdir ( my_git ) :
1375
+ if os .path .isfile (my_main ):
1375
1376
for name in ["git_config.py" , "project.py" , "subcmds" ]:
1376
1377
if not os .path .exists (os .path .join (my_dir , name )):
1377
1378
return None , None
1378
- return my_main , my_git
1379
+ return my_main , my_git if os . path . isdir ( my_git ) else None
1379
1380
return None , None
1380
1381
1381
1382
0 commit comments