mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-09-05 08:37:20 -04:00
Better detect if fallback editor needs to be used
This commit is contained in:
+3
-3
@@ -16,9 +16,9 @@ func TempInit(configFileMap map[string]string) {
|
||||
|
||||
// ensure textEditor is set
|
||||
if configFileMap["textEditor"] == "" {
|
||||
textEditor := os.Getenv("EDITOR")
|
||||
if textEditor == "" {
|
||||
textEditor = fallbackEditor
|
||||
textEditor, editorEnvPresent := os.LookupEnv("EDITOR")
|
||||
if !editorEnvPresent {
|
||||
textEditor = FallbackEditor
|
||||
}
|
||||
configFileMap["textEditor"] = textEditor
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user