Merge pull request #6103 from jsoref/issue-6102
feat: Fallback to notepad on Windows
This commit is contained in:
commit
9af193029b
1 changed files with 3 additions and 3 deletions
|
|
@ -20,14 +20,14 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
if runtime.GOOS == "windows" {
|
if g := os.Getenv("GIT_EDITOR"); g != "" {
|
||||||
defaultEditor = "notepad"
|
|
||||||
} else if g := os.Getenv("GIT_EDITOR"); g != "" {
|
|
||||||
defaultEditor = g
|
defaultEditor = g
|
||||||
} else if v := os.Getenv("VISUAL"); v != "" {
|
} else if v := os.Getenv("VISUAL"); v != "" {
|
||||||
defaultEditor = v
|
defaultEditor = v
|
||||||
} else if e := os.Getenv("EDITOR"); e != "" {
|
} else if e := os.Getenv("EDITOR"); e != "" {
|
||||||
defaultEditor = e
|
defaultEditor = e
|
||||||
|
} else if runtime.GOOS == "windows" {
|
||||||
|
defaultEditor = "notepad"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue