joshwcomeau/guppy

Throw a warning prompt if "Open in Editor" fails.

Open

#203 opened on Sep 2, 2018

View on GitHub
 (8 comments) (0 reactions) (0 assignees)JavaScript (151 forks)github user discovery
buggood first issueupcoming feature

Repository metrics

Stars
 (3,248 stars)
PR merge metrics
 (PR metrics pending)

Description

Is your feature request related to a problem? Please describe. In #171, I added a couple new options to the Application Menu:

  • Open Folder
  • Open in Editor

The latter, "Open in Editor", is supposed to open the current project in VS Code, or Sublime Text, or Atom, whatever.

It relies on the existence of an "EDITOR" environment variable that should be present after you've installed an editor, but may not be.

Right now, if no EDITOR is found, it just silently fails.

Describe the solution you'd like We should pop a warning prompt, something like:

No editor found

Have you installed a code editor, like Visual Studio Code?

If so, you may have an issue with your PATH.

Learn more:

Additional context We should use dialog.showMessageBox from Electron, to use system prompts. We should also write up some quick documentation to explain how to fix this issue (and how PATH works more broadly)

This is a great first issue for new contributors! Especially for folks who are already a little familiar with PATH.

Contributor guide