From e8ca84ffb3ad74ce9c850e24c315d56feaa56462 Mon Sep 17 00:00:00 2001 From: Martin Dobias Date: Thu, 9 Jun 2022 17:17:34 +0200 Subject: [PATCH] Fix broken status and download-file in CLI (fixes #139, fixes #140) --- mergin/cli.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mergin/cli.py b/mergin/cli.py index 47a705d3..77033584 100755 --- a/mergin/cli.py +++ b/mergin/cli.py @@ -332,10 +332,8 @@ def download_file(ctx, filepath, output, version): mc = ctx.obj["client"] if mc is None: return - mp = MerginProject(os.getcwd()) - project_path = mp.metadata["name"] try: - job = download_file_async(mc, project_path, filepath, output, version) + job = download_file_async(mc, os.getcwd(), filepath, output, version) with click.progressbar(length=job.total_size) as bar: last_transferred_size = 0 while download_project_is_running(job): @@ -377,7 +375,7 @@ def status(ctx): _print_unhandled_exception() return - if mc.has_unfinished_pull(): + if mc.has_unfinished_pull(os.getcwd()): click.secho("The previous pull has not finished completely: status " "of some files may be reported incorrectly. Use " "resolve_unfinished_pull command to try to fix that.", fg="yellow")