Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

A configuration file is required for --help #7389

Closed
babolivier opened this issue May 1, 2020 · 2 comments
Closed

A configuration file is required for --help #7389

babolivier opened this issue May 1, 2020 · 2 comments
Labels
A-Docs things relating to the documentation z-bug (Deprecated Label) z-p2 (Deprecated Label)

Comments

@babolivier
Copy link
Contributor

babolivier commented May 1, 2020

Synapse complains about missing a config file if called with --help, instead of just printing the help doc:

$ python -m synapse.app.homeserver --help
usage: homeserver.py [-c CONFIG_FILE] [--generate-config] [--generate-missing-configs] [-H SERVER_NAME] [--report-stats {yes,no}] [--config-directory DIRECTORY] [--data-directory DIRECTORY] [--open-private-ports]
homeserver.py: error: Must supply a config file.
A config file can be automatically generated using "--generate-config -H SERVER_NAME -c CONFIG-FILE"

If a configuration file is provided, it will print the help doc as expected:

$ python -m synapse.app.homeserver -c homeserver.yaml --help
usage: homeserver.py [-h] [-c CONFIG_FILE] [--generate-config] [--generate-missing-configs] [-H SERVER_NAME] [--report-stats {yes,no}] [--config-directory DIRECTORY] [--data-directory DIRECTORY] [--open-private-ports] [-D]
                     [--print-pidfile] [--manhole PORT] [-d SQLITE_DATABASE_PATH] [-n] [--enable-registration]

Synapse Homeserver

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG_FILE, --config-path CONFIG_FILE
                        Specify config file. Can be given multiple times and may specify directories containing *.yaml files.
[...]

It seems a bit silly to me that we need a configuration file just to display the help for synapse.app.homeserver.

@babolivier babolivier added z-bug (Deprecated Label) z-p2 (Deprecated Label) A-Docs things relating to the documentation labels May 1, 2020
@richvdh
Copy link
Member

richvdh commented May 1, 2020

I believe this got fixed by #7249

@richvdh richvdh closed this as completed May 1, 2020
@babolivier
Copy link
Contributor Author

Wow I really expected my memory's lifespan to be better than that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Docs things relating to the documentation z-bug (Deprecated Label) z-p2 (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

2 participants