Application assumes presence of "zones" directory
If you don't have a zones directory present from where you invoke hermes (note: this is not necessarily the same path as where the hermes binary itself lives on the system), the application fails with the error Server failed to initialize: Authority(Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })). I see a few options for improving this:
-
Update the
README.mdwith instructions covering this, and leave it to the user to setup thezonesdirectory before runninghermes. -
Create the
zonesdirectory if not present whenhermesis invoked (e.g.fs::create_dir_all("zones")?;):-
At the location that
hermeswas invoked from. -
At a predefined location in the
$HOMEdirectory of the user (e.g.$home/.hermes/zones).
-
-
Add a command line argument for specifying the path of the
zonesdirectory when invokinghermesand:-
Make this a required argument.
-
Make this optional, and when not present and no
zonesdirectory is found, create it per 2 above.
-
At a minimum I think doing 1 would be an improvement, and I'd be happy to quickly write that up and submit.
If there's interest in another option, either from this list or some other solution, let me know and I could put something together for review.
Hi Jon!
That’s a good point of feedback and something I’ve heard from other users too. Suggestion 2.1 i.e auto-creating the dir in the folder that it was invoked from would be my preferred solution. It’d be great if you wanted to contribute a solution here.
Great, I'll submit a pull request soon for that.