Render method errors on subsequent runs (file exists)
Blokje5 opened this issue · comments
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.
This bug is here:
go-diagrams/diagram/diagram.go
Line 91 in c78c821
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.
linked the PR