Skip to content

Commit 607ab82

Browse files
authored
Merge pull request #141 from MerginMaps/fix-139-140
Fix broken status and download-file in CLI
2 parents e7399fc + e8ca84f commit 607ab82

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

mergin/cli.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,10 +332,8 @@ def download_file(ctx, filepath, output, version):
332332
mc = ctx.obj["client"]
333333
if mc is None:
334334
return
335-
mp = MerginProject(os.getcwd())
336-
project_path = mp.metadata["name"]
337335
try:
338-
job = download_file_async(mc, project_path, filepath, output, version)
336+
job = download_file_async(mc, os.getcwd(), filepath, output, version)
339337
with click.progressbar(length=job.total_size) as bar:
340338
last_transferred_size = 0
341339
while download_project_is_running(job):
@@ -377,7 +375,7 @@ def status(ctx):
377375
_print_unhandled_exception()
378376
return
379377

380-
if mc.has_unfinished_pull():
378+
if mc.has_unfinished_pull(os.getcwd()):
381379
click.secho("The previous pull has not finished completely: status "
382380
"of some files may be reported incorrectly. Use "
383381
"resolve_unfinished_pull command to try to fix that.", fg="yellow")

0 commit comments

Comments
 (0)