Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render method errors on subsequent runs (file exists) #21

Open
Blokje5 opened this issue Mar 22, 2021 · 3 comments
Open

Render method errors on subsequent runs (file exists) #21

Blokje5 opened this issue Mar 22, 2021 · 3 comments

Comments

@Blokje5
Copy link

Blokje5 commented Mar 22, 2021

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
Copy link

This bug is here:

if err := os.Mkdir(outdir, os.ModePerm); err != nil {

@zalgonoise
Copy link

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
Copy link

linked the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants