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

fix(cli): do not exit after 1st formatted file #1523

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

maxbrunet
Copy link
Contributor

Hello! 👋

Thank you so much for d2, loving it so far!

Found a small bug in d2 fmt: If ran on multiple non-formatted files at once, it would format the 1st and exit, leaving the others non-formatted.

Copy link
Collaborator

@alixander alixander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, thanks!

we should also accept directories, made this issue: #1526

can you add a test in https://github.com/terrastruct/d2/blob/master/e2etests-cli/main_test.go ?
i've just added a basic fmt test that you can follow as example: #1527

@maxbrunet
Copy link
Contributor Author

maxbrunet commented Aug 3, 2023

can you add a test in master/e2etests-cli/main_test.go ?
i've just added a basic fmt test that you can follow as example: #1527

Awesome, exactly what I was looking for, thank you!

Copy link
Collaborator

@alixander alixander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏 !

@alixander alixander merged commit aff4810 into terrastruct:master Aug 3, 2023
2 checks passed
@maxbrunet maxbrunet deleted the fix/fmt/format-all branch August 3, 2023 01:36
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

Successfully merging this pull request may close these issues.

2 participants