Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hooks: All actions should be required if any are set #482

Open
charlespierce opened this issue Jun 19, 2019 · 0 comments
Open

Hooks: All actions should be required if any are set #482

charlespierce opened this issue Jun 19, 2019 · 0 comments
Labels

Comments

@charlespierce
Copy link
Contributor

Currently we allow users to specify hooks for any or all of the actions associated with fetching a tool:

  • distro hooks determine the download URL for a specific version of a tool
  • index hooks determine the URL for the index of available versions
  • latest hooks determine the URL for getting the latest version of a tool

Since these are interconnected, we should require that all of them be set if any of them are. Specifically, for users with an internal corporate repository that has a limited set of available versions of e.g. node, if they set the distro hook but not the index hook, then some developers will wind up using the public index to try to download a version of node that isn't actually available. This leads to confusing error messages and a poor developer experience.

One possible variation is that we could make the latest hook optional (or remove it entirely), since the behavior of that hook is different between Node and Yarn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant