Explorar el Código

Check fields length to avoid panic in editor prompt. Fixes #834

Jguer hace 5 años
padre
commit
422a5931af
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      config.go

+ 3 - 0
config.go

@@ -255,6 +255,9 @@ func editor() (string, []string) {
 			}
 
 			editorArgs := strings.Fields(editorInput)
+			if len(editorArgs) == 0 {
+				continue
+			}
 
 			editor, err := exec.LookPath(editorArgs[0])
 			if err != nil {