Render method errors on subsequent runs (file exists)
Blokje5 opened this issue · 3 comments
Blokje5 commented
When running a go-diagram more then once, the Render method errors with the following message:
mkdir go-diagrams: file exists
Ideally Render supports the option to overwrite the dot file in the go-diagrams directory.
discentem commented
This bug is here:
go-diagrams/diagram/diagram.go
Line 91 in c78c821
zalgonoise commented
This is still present, and is present in a few occurrences (in diagaram/diagram.go and in diagram/node.go; as well as some similar occurrences in cmd/gen/main.go)
To fix this, we can check if the error is an os.ErrExist error. I will open a fork and PR for this, soon.
zalgonoise commented
linked the PR