Fix root path resolution for updated Buck
Since the last Buck upgraded this morning with [1] the root path resolution is broken. This is due to the different expansion of the __file__ macro into a deeper structure, including the python relative path name inside a PEX directory structure. Example: gerrit/buck-out/bin/tools/maven/mvn.pex/gerrit-extension-api/pom.xml In order to go back to the root package structure and locate the pom.xml file correctly, we need now to go back until the .buckconfig file is found (instead of going back exactly 3 times as it was before). P.S. Without this change the targets api_install and war_install are broken on master. Change-Id: I1a99606ad304c245b21ba501f15c473142a89fc2
This commit is contained in:
parent
fbb798ff15
commit
8f11e6c9fc
@ -32,7 +32,7 @@ JRE = '/'.join([
|
||||
])
|
||||
|
||||
ROOT = path.abspath(__file__)
|
||||
for _ in range(0, 3):
|
||||
while not path.exists(path.join(ROOT, '.buckconfig')):
|
||||
ROOT = path.dirname(ROOT)
|
||||
|
||||
opts = OptionParser()
|
||||
|
@ -34,7 +34,7 @@ if not args.v:
|
||||
exit(1)
|
||||
|
||||
root = path.abspath(__file__)
|
||||
for _ in range(0, 3):
|
||||
while not path.exists(path.join(root, '.buckconfig')):
|
||||
root = path.dirname(root)
|
||||
|
||||
if 'install' == args.a:
|
||||
|
Loading…
Reference in New Issue
Block a user