fix zebrad config > zebrad.toml
when zebrad.toml doesn't already exist
#399
Labels
C-bug
Category: This is a bug
E-help-wanted
Call for participation: Help is requested to fix this issue.
good first issue
zebrad
is currently setup so that it can run without a config, but if the config is exists there are required fields. This causes issues when trying to create a config file. Runningcargo run -- config > zebrad.config
inzebra/zebrad
causes the OS to immediately create an empty file to store the output of the command, but the output happens after the application attempts to load the config file. This causes the application to immediately exit with an error because it is unable to parse the empty file as a config file.To fix this we should make the behavior consistent whether or not you have a config file. An empty config file should result in the same behavior as an absent one, which means we want to make whatever fields it requires when a config exists optional.
The text was updated successfully, but these errors were encountered: