Drop _go_to_top_cargo_toml
This commit is contained in:
parent
7b93f1a01a
commit
b8c292f0aa
1 changed files with 0 additions and 13 deletions
|
@ -32,15 +32,6 @@ def _cargo_toml(source_path, path, exclude_vendor=True):
|
||||||
raise Exception(f'Cargo.toml not found for binary {binary}')
|
raise Exception(f'Cargo.toml not found for binary {binary}')
|
||||||
|
|
||||||
|
|
||||||
def _go_to_top_cargo_toml(source_path, path):
|
|
||||||
"""Find the top Cargo.toml and change directory."""
|
|
||||||
path = os.path.dirname(path)
|
|
||||||
while path != source_path:
|
|
||||||
if os.path.exists(os.path.join(path, 'Cargo.toml')):
|
|
||||||
os.chdir(path)
|
|
||||||
path = os.path.dirname(path)
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
group = parser.add_mutually_exclusive_group(required=True)
|
group = parser.add_mutually_exclusive_group(required=True)
|
||||||
|
@ -110,10 +101,6 @@ def main():
|
||||||
return data
|
return data
|
||||||
|
|
||||||
for f in files:
|
for f in files:
|
||||||
# We need to change directory, so cargo can find any local
|
|
||||||
# configuration file
|
|
||||||
_go_to_top_cargo_toml(args.path, f)
|
|
||||||
|
|
||||||
data = set()
|
data = set()
|
||||||
mds = Metadata.from_file(f)
|
mds = Metadata.from_file(f)
|
||||||
for md in mds:
|
for md in mds:
|
||||||
|
|
Loading…
Reference in a new issue