Skip to content

Commit 45b6f72

Browse files
committed
Prioritise zip file runfiles case
See if this fixes Windows CI
1 parent da225b5 commit 45b6f72

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python/private/python_bootstrap_template.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,10 @@ def RunfilesEnvvar(module_space):
251251
'RUNFILES_MANIFEST_FILE' and var_value is the path to that directory or
252252
file, or (None, None) if runfiles couldn't be found.
253253
"""
254+
# If running from a zip, there's no manifest file.
255+
if IsRunningFromZip():
256+
return ('RUNFILES_DIR', module_space)
257+
254258
# If this binary is the data-dependency of another one, the other sets
255259
# RUNFILES_MANIFEST_FILE or RUNFILES_DIR for our sake.
256260
runfiles = os.environ.get('RUNFILES_MANIFEST_FILE', None)
@@ -261,10 +265,6 @@ def RunfilesEnvvar(module_space):
261265
if runfiles:
262266
return ('RUNFILES_DIR', runfiles)
263267

264-
# If running from a zip, there's no manifest file.
265-
if IsRunningFromZip():
266-
return ('RUNFILES_DIR', module_space)
267-
268268
# Look for the runfiles "output" manifest, argv[0] + ".runfiles_manifest"
269269
runfiles = module_space + '_manifest'
270270
if os.path.exists(runfiles):

0 commit comments

Comments
 (0)