gopass/internal/editor/edit_windows.go
Dominik Schulz 71861e4a8b
chore: Update golangci-lint (#3287)
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2025-11-12 21:09:26 +01:00

27 lines
452 B
Go

//go:build windows
package editor
import (
"os"
"github.com/gopasspw/gopass/internal/config"
"github.com/urfave/cli/v2"
)
// Path return the name/path of the preferred editor
func Path(c *cli.Context) string {
if c != nil {
if ed := c.String("editor"); ed != "" {
return ed
}
}
if ed := config.String(c.Context, "edit.editor"); ed != "" {
return ed
}
if ed := os.Getenv("EDITOR"); ed != "" {
return ed
}
return "notepad.exe"
}