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

Improve "No Editor" error #57

Open
elwayman02 opened this issue May 11, 2020 · 4 comments
Open

Improve "No Editor" error #57

elwayman02 opened this issue May 11, 2020 · 4 comments

Comments

@elwayman02
Copy link
Contributor

ERROR release-it-lerna-changelog configured to launch your editor but no editor was found (tried $EDITOR and searching $PATH for editor).

This error could be improved by telling the user that the release-it config specifies that we launch your $EDITOR. The user may not have been the one to set up the release-it config for that repo, so they may not understand why they're getting this error other than the missing $EDITOR token.

@rwjblue
Copy link
Collaborator

rwjblue commented May 21, 2020

I wonder if instead of making the error better we could just prompt with a selection of detected editors? There are some decent npm packages that we could leverage for that, and it seems better still than an even better error message.

What do you think?

@elwayman02
Copy link
Contributor Author

I like this, with the caveat that it would be even nicer if the prompt gave them an option to select a detected editor or no editor at all. That way, the owner of a repo could set launchEditor to true, but a co-maintainer could also choose not to use an editor if that's their preferred workflow. Nothing would change about the existing workflow of auto-opening if $EDITOR is set, but we should account for the possibility that the user has purposefully left it un-set.

Copy link
Collaborator

rwjblue commented May 21, 2020

an option to select a detected editor or no editor at all.

Ya, sounds great! I really like that direction. I personally always want the ability to manually review and tweak the lerna-changelog results one last time (hence wanting to use launchEditor), but this proposed workflow is a really nice fallback for when $EDITOR is missing that still mostly provides the same capability (we will most likely find an editor on every system) and a simple painless opt-out without failing the release process.

@elwayman02
Copy link
Contributor Author

My editor is my IDE, can you detect that? :P

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

No branches or pull requests

2 participants