Closed randomcamel closed 9 years ago
I'll make improving the error messages my first priority next time I have some time to work on this, if someone else hasn't done so already. Thanks for filing this issue.
You are correct -a|--anonymous
is required. It is the role the server uses for unauthenticated requests.
@randomcamel good point about the options being confusing. I guess I've gotten kind of used to them during development but looking at it fresh there are things to improve.
--anonymous
looks at first sight like a boolean flag similar to --secure
.--help
but nowhere does it tell you you can do that.It appears that number one would require us to ditch our option parser optparse-applicative because it doesn't support customized messages about missing arguments. (There is a tantalizing function in the library but I experimented with it and found it only prints errors for arguments which are provided-and-blank, not those which are omitted.)
Number two is something we should absolutely do. It will be a backwards incompatible change so let's put some thought into the best names to use so we don't have to change it again. (Among other things my buildpack to deploy postgres on heroku relies on the command line arguments being what they are and will have to change too.)
As for three, I'd like the help screen to always show the extra details, not wait until --help
gets specified. There's a function for this too but I must not be using it right.
@adambaker I'd love your help if you get some time to look into this.
My report was a little crabby, and I want to say it's a cool tool that seems to work well once it's running. :smile:
I was forced to revert the commits that fixed this issue due to some troublesome dependencies. I'm reopening this issue and will investigate how to fix the functionality without introducing any new dependencies.
There has been some improvement to this issue. The program now shows full usage instructions for any error. It doesn't yet say what specifically went wrong, but does present a clearer overview.
I ran into this issue too. I think a stop gap is just specifying in the help what is required. Additionally the documentation on the README for the project does not include the -a option.
The usage instructions have improved since February when this issue was created. I'm going to close this original issue and we can open future issues with specific usability suggestions as they arise.
Added docs for the new command line arguments here: http://postgrest.com/install/server/#running-the-server
I'm giving
postgrest
what look like reasonable options, but it won't start and gives me no hints about why.Do the options need to be in a specific order? Does one of them have an invalid value? I tried using the long options just in case, and adding
--db-pool
and--db-port
even when I'm fine with defaults.I don't know what my particular problem might be, but the app could give me some help. For extra confusion, sometimes it prints the vertical explanation of each option, and sometimes it doesn't.
[EDIT: Looks like
--anonymous
is required.]