• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

charmbracelet / glow / 5999566226

28 Aug 2023 12:05PM UTC coverage: 6.945% (+0.05%) from 6.899%
5999566226

push

github

web-flow
fix: handle running inside a snap (#527)

* fix: handle running inside a snap

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* test: fixes

* docs: improve error message

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: bashbunni <bunni@bashbunni.dev>

16 of 16 new or added lines in 3 files covered. (100.0%)

196 of 2822 relevant lines covered (6.95%)

3.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/ui/editor.go
1
package ui
2

3
import (
4
        tea "github.com/charmbracelet/bubbletea"
5
        "github.com/charmbracelet/glow/editor"
6
)
7

8
type editorFinishedMsg struct{ err error }
9

10
func openEditor(path string) tea.Cmd {
×
11
        cb := func(err error) tea.Msg {
×
12
                return editorFinishedMsg{err}
×
13
        }
×
14

15
        editor, err := editor.Cmd(path)
×
16
        if err != nil {
×
17
                return func() tea.Msg {
×
18
                        return errMsg{err}
×
19
                }
×
20
        }
21
        return tea.ExecProcess(editor, cb)
×
22
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc