feat: Fallback to notepad on Windows

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
Josh Soref 2022-08-18 17:03:47 -04:00
parent 6a8deb1f5a
commit 723daf714e

View file

@ -20,14 +20,14 @@ var (
)
func init() {
if runtime.GOOS == "windows" {
defaultEditor = "notepad"
} else if g := os.Getenv("GIT_EDITOR"); g != "" {
if g := os.Getenv("GIT_EDITOR"); g != "" {
defaultEditor = g
} else if v := os.Getenv("VISUAL"); v != "" {
defaultEditor = v
} else if e := os.Getenv("EDITOR"); e != "" {
defaultEditor = e
} else if runtime.GOOS == "windows" {
defaultEditor = "notepad"
}
}