We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b6164c2 commit e0ae456Copy full SHA for e0ae456
1 file changed
synthtool/gcp/templates/python_samples/noxfile.py.j2
@@ -201,6 +201,11 @@ def _get_repo_root():
201
break
202
if Path(p / ".git").exists():
203
return str(p)
204
+ # .git is not available in repos cloned via Cloud Build
205
+ # setup.py is always in the library's root, so use that instead
206
+ # https://github.com/googleapis/synthtool/issues/792
207
+ if Path(p / "setup.py").exists():
208
+ return str(p)
209
p = p.parent
210
raise Exception("Unable to detect repository root.")
211
0 commit comments