Merge pull request #6103 from jsoref/issue-6102

feat: Fallback to notepad on Windows
This commit is contained in:
Nate Smith 2022-08-23 12:42:27 -05:00 committed by GitHub
commit 9af193029b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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"
}
}