svenstaro/miniserve

Flag jank?

Yusuto opened this issue · 5 comments

I recently updated miniserve through Cargo to version 0.22.0, and all of a sudden the command I used to used to use to serve a folder stopped working. The culprit seems to be the cluster of flags in miniserve -p 7878 -c monokai -vugrzWa "user:password", when I expanded it to miniserve -p 7878 -c monokai -v -u -g -r -z -W -a "user:password" it worked perfectly again.

This issue seems to have emerged between 7098ad9 and e2e6251, I will do some more testing to maybe figure out after which commit exactly this has changed.

Might this be some kind of issue with clap? This seems like a pretty obvious thing, does anyone else have this, or is it somehow a bug local to only me?

I found it, the offending commit seems to be e2ae526, which does modify args.rs and config.rs, so that seems plausible I think.

Yeah I don't think there's anything that can be done here as it's ambiguous. You're going to have to separate -u out. After all, -ua could mean that you want to allow directory a for uploading as well as -u -a.

Yep I literally just noticed that, I apparently didn't read the help thoroughly and didn't notice that -u takes an argument, so my bad, this is not actually an issue! »Debugging« it was a bit fun though.
Apologies for the unnecessary issue!

All good! Hope you find miniserve useful.

Yep I most definitely do, I use it all the time! It makes transferring large files much faster and easier than using some online upload service or messenger to transfer it, thank you for all your work on it!