From 723daf714ef4cc9eadd140296867ed48027a34ae Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 18 Aug 2022 17:03:47 -0400 Subject: [PATCH] feat: Fallback to notepad on Windows Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- pkg/surveyext/editor.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/surveyext/editor.go b/pkg/surveyext/editor.go index 7585c3fe4..420ecc4e5 100644 --- a/pkg/surveyext/editor.go +++ b/pkg/surveyext/editor.go @@ -20,14 +20,14 @@ var ( ) func init() { - if runtime.GOOS == "windows" { - defaultEditor = "notepad" - } else if g := os.Getenv("GIT_EDITOR"); g != "" { + if g := os.Getenv("GIT_EDITOR"); g != "" { defaultEditor = g } else if v := os.Getenv("VISUAL"); v != "" { defaultEditor = v } else if e := os.Getenv("EDITOR"); e != "" { defaultEditor = e + } else if runtime.GOOS == "windows" { + defaultEditor = "notepad" } }