fix: say offline files are not downloaded

The line mode under --offline, with files that need the internet,
ended on Done with 0 files installed. It now counts them as not
downloaded and says --offline is why, not an answer.
This commit is contained in:
Abdessamad Derraz committed 2026-10-27 00:45:57 +01:00
1 parent 92ee80f40b
commit 7abe5b8309
5 files changed
+16 -12

No files matched your search

+3 -1
View File
@@ -5403,7 +5403,7 @@ def _report_outcome(
print(f" ... and {len(failures) - 10} more")
if declined and not downloaded and not errors and not interrupted:
print(f"\nNothing installed: {_plural(declined, 'file')} not downloaded, "
"as answered.")
+ ("which --offline does not do." if _offline_only() else "as answered."))
print(f"{_plural(up_to_date, 'file')} already up to date at {_locations(paths)}.")
return
kept = _kept_lines()
@@ -10405,7 +10405,9 @@ def _install(args: argparse.Namespace, real_stdout: TextIO) -> None:
"--offline does not use. Copy them from your old card or a folder "
"(--from), or run the installer again with a pack (--from-pack) or "
"without --offline.")
# Not done: the summary says they were not downloaded.
files_pending += len(fetched)
total_declined += len(fetched)
to_download = [f for f in to_download if id(f) in copies]
fetched = []
dl_size = sum(f.get("size", 0) for f in to_download)