Skip to content
Snippets Groups Projects
Commit 3d8700a4 authored by Georges Racinet's avatar Georges Racinet
Browse files

Server command: made --repositories-root work

Apparently, `None` as default argument for an option is
incompatible with it having a value. The only way to detect
a missing string argument is to evaluate to bool. In this case,
it's not a problem.
parent f39ef3a8
No related branches found
No related tags found
No related merge requests found
Pipeline #8484 failed
......@@ -47,7 +47,7 @@
@command(b'hgitaly-serve',
[(b'', b'repositories-root',
None,
b'',
_(b'Path to the root directory for repositories storage. '
b'Defaults to the `heptapod.repositories-root` '
b'configuration item '),
......@@ -77,7 +77,7 @@
# (GDK and monolithic Docker container) bind explicitely on IPv4
listen_urls = [DEFAULT_LISTEN_URL]
repos_root = opts.get('repositories_root')
if repos_root is None:
if not repos_root:
repos_root = ui.config(b'heptapod', b'repositories-root')
if repos_root is None:
raise error.Abort(_(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment