diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-09-20 13:21:34 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-09-20 13:21:34 +0200 |
| commit | 25d2143a627531fc0475d639c1e8f657ccafa630 (patch) | |
| tree | 3b5b69b64f5f6879810842464056543e315c64a4 /internal/fsm | |
| parent | b0e4e454fc94935cf8ee3282a07596ec53268a18 (diff) | |
Golang-ci-lint: Fixes
Diffstat (limited to 'internal/fsm')
| -rw-r--r-- | internal/fsm/fsm.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/internal/fsm/fsm.go b/internal/fsm/fsm.go index 292e09e..4fc647e 100644 --- a/internal/fsm/fsm.go +++ b/internal/fsm/fsm.go @@ -99,11 +99,13 @@ func (fsm *FSM) writeGraph() { return } - f.WriteString(graph) + _, writeErr := f.WriteString(graph) f.Close() - cmd := exec.Command("mmdc", "-i", graphFile, "-o", graphImgFile, "--scale", "4") - - cmd.Start() + if writeErr != nil { + cmd := exec.Command("mmdc", "-i", graphFile, "-o", graphImgFile, "--scale", "4") + // Generating is best effort + _ = cmd.Start() + } } func (fsm *FSM) GoBack() { |
