summaryrefslogtreecommitdiff
path: root/internal/fsm/fsm.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-09-20 13:21:34 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-09-20 13:21:34 +0200
commit25d2143a627531fc0475d639c1e8f657ccafa630 (patch)
tree3b5b69b64f5f6879810842464056543e315c64a4 /internal/fsm/fsm.go
parentb0e4e454fc94935cf8ee3282a07596ec53268a18 (diff)
Golang-ci-lint: Fixes
Diffstat (limited to 'internal/fsm/fsm.go')
-rw-r--r--internal/fsm/fsm.go10
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() {