aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2022-10-10 21:18:57 +0200
committerDaniel Schadt <kingdread@gmx.de>2022-10-10 21:18:57 +0200
commitaa7ffe837fe5e0739c32a633d2d02544ca5d72ba (patch)
tree41ca993e614c1f24d52df5acfa8f781875efabe4
parent3e900b56cf7f642d0851dfe50914c80f449d18df (diff)
downloadfietsboek-aa7ffe837fe5e0739c32a633d2d02544ca5d72ba.tar.gz
fietsboek-aa7ffe837fe5e0739c32a633d2d02544ca5d72ba.tar.bz2
fietsboek-aa7ffe837fe5e0739c32a633d2d02544ca5d72ba.zip
make fietsupdater status warn about unknown update
-rw-r--r--fietsboek/updater/cli.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/fietsboek/updater/cli.py b/fietsboek/updater/cli.py
index 9a64a24..a6ea6c1 100644
--- a/fietsboek/updater/cli.py
+++ b/fietsboek/updater/cli.py
@@ -166,8 +166,17 @@ def status(config):
heads = updater.heads()
click.secho("Current versions:", fg="yellow")
if current:
+ has_unknown = False
for i in current:
- click.echo(i)
+ if updater.exists(i):
+ click.echo(i)
+ else:
+ click.echo(f"{i} [unknown]")
+ has_unknown = True
+ if has_unknown:
+ click.echo("[*] Your version contains revisions that are unknown to me")
+ click.echo("[*] This can happen if you apply an update and then downgrade the code")
+ click.echo("[*] Make sure to keep your code and data in sync!")
else:
click.secho("No current version", fg="red")
click.secho("Available updates:", fg="yellow")