Merge pull request #387 from ahmedelgabri/master
Make sure editor is set properly & not overridden later
This commit is contained in:
commit
65a7d05205
1 changed files with 3 additions and 6 deletions
|
|
@ -25,14 +25,11 @@ var (
|
|||
func init() {
|
||||
if runtime.GOOS == "windows" {
|
||||
editor = "notepad"
|
||||
}
|
||||
if g := os.Getenv("GIT_EDITOR"); g != "" {
|
||||
} else if g := os.Getenv("GIT_EDITOR"); g != "" {
|
||||
editor = g
|
||||
}
|
||||
if v := os.Getenv("VISUAL"); v != "" {
|
||||
} else if v := os.Getenv("VISUAL"); v != "" {
|
||||
editor = v
|
||||
}
|
||||
if e := os.Getenv("EDITOR"); e != "" {
|
||||
} else if e := os.Getenv("EDITOR"); e != "" {
|
||||
editor = e
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue