소스 검색

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

Jguer 5 년 전
부모
커밋
422a5931af
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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 {