File tree 2 files changed +13
-3
lines changed
translation/samples/snippets
2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,11 @@ def _get_repo_root():
199
199
break
200
200
if Path (p / ".git" ).exists ():
201
201
return str (p )
202
+ # .git is not available in repos cloned via Cloud Build
203
+ # setup.py is always in the library's root, so use that instead
204
+ # https://github.com/googleapis/synthtool/issues/792
205
+ if Path (p / "setup.py" ).exists ():
206
+ return str (p )
202
207
p = p .parent
203
208
raise Exception ("Unable to detect repository root." )
204
209
Original file line number Diff line number Diff line change @@ -180,9 +180,9 @@ def py(session):
180
180
if session .python in TESTED_VERSIONS :
181
181
_session_tests (session )
182
182
else :
183
- session .skip (
184
- "SKIPPED: {} tests are disabled for this sample." . format ( session .python )
185
- )
183
+ session .skip ("SKIPPED: {} tests are disabled for this sample." . format (
184
+ session .python
185
+ ))
186
186
187
187
188
188
#
@@ -199,6 +199,11 @@ def _get_repo_root():
199
199
break
200
200
if Path (p / ".git" ).exists ():
201
201
return str (p )
202
+ # .git is not available in repos cloned via Cloud Build
203
+ # setup.py is always in the library's root, so use that instead
204
+ # https://github.com/googleapis/synthtool/issues/792
205
+ if Path (p / "setup.py" ).exists ():
206
+ return str (p )
202
207
p = p .parent
203
208
raise Exception ("Unable to detect repository root." )
204
209
You can’t perform that action at this time.
0 commit comments