()
| 2803 | } |
| 2804 | |
| 2805 | func findEditor() string { |
| 2806 | for _, env := range []string{"GIT_EDITOR", "VISUAL", "EDITOR"} { |
| 2807 | if val := strings.TrimSpace(os.Getenv(env)); val != "" { |
| 2808 | return val |
| 2809 | } |
| 2810 | } |
| 2811 | return "vi" |
| 2812 | } |
| 2813 | |
| 2814 | func readConfirmationChoice(ctx *snap.Context) (byte, error) { |
| 2815 | if file, ok := ctx.Stdin().(*os.File); ok { |