summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarius Makovsky <traveltissues@protonmail.com>2019-09-06 16:54:06 +0100
committerDarius Makovsky <traveltissues@protonmail.com>2019-09-09 11:28:49 +0100
commitd2b901f677d62060c6a9f188c919d88e08b9b6e9 (patch)
tree06f21da20fbe98fdab52af807d8412f6596b2ed3
parent20a920f4fd3641b43e714b6c9a9d57a7095c66c5 (diff)
downloadbuildstream-d2b901f677d62060c6a9f188c919d88e08b9b6e9.tar.gz
casserver.py: Use show_default for options
is_flag is always False by default (you can't specify an absent flag)
-rw-r--r--src/buildstream/_cas/casserver.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/buildstream/_cas/casserver.py b/src/buildstream/_cas/casserver.py
index bb011146e..716178bb4 100644
--- a/src/buildstream/_cas/casserver.py
+++ b/src/buildstream/_cas/casserver.py
@@ -107,14 +107,12 @@ def create_server(repo, *, enable_push, quota, index_only):
@click.option('--server-key', help="Private server key for TLS (PEM-encoded)")
@click.option('--server-cert', help="Public server certificate for TLS (PEM-encoded)")
@click.option('--client-certs', help="Public client certificates for TLS (PEM-encoded)")
-@click.option('--enable-push', default=False, is_flag=True,
+@click.option('--enable-push', is_flag=True,
help="Allow clients to upload blobs and update artifact cache")
-@click.option('--quota', type=click.INT,
- help="Maximum disk usage in bytes",
- default=10e9)
-@click.option('--index-only', type=click.BOOL,
- help="Only provide the BuildStream artifact and source services (\"index\"), not the CAS (\"storage\")",
- default=False)
+@click.option('--quota', type=click.INT, default=10e9, show_default=True,
+ help="Maximum disk usage in bytes")
+@click.option('--index-only', is_flag=True,
+ help="Only provide the BuildStream artifact and source services (\"index\"), not the CAS (\"storage\")")
@click.argument('repo')
def server_main(repo, port, server_key, server_cert, client_certs, enable_push,
quota, index_only):