Closed starbelly closed 5 years ago
Yes, it should be required for cut
as well.
Ok, got some feedback from Fred... so, what we can do is require a repo name for all hex ops that require a repo when non-defaults exist. So, in the case of not having any non-default configs, we just publish (i.e., no repo name is required). If non-default configs are found and no name was provided, bail.
Sound good?
yup
@tsloughter hmm, look at the latest changes. We will require supplying the repo for searching... maybe it shouldn't be this way for that... though, a valid read key is indeed required for searching 🤔
We could add an optional param for rebar3_hex_utils:repo/1... use_first
where the first repo in config would be used. This creates a problem though if the intention is to allow searching repositories other than hexpm.
This PR aims to provide a consistent API when deciding what commands require a repo argument and more specifically when.
Things in this PR not directly related to the above:
To recap on the API part here are the rules for when a repo argument is required going forward:
Cut
Docs
Key
Owner
Publish
Repo
Retire
Revert
User
Search