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: Test setup does not await file copying #68

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

marvin-kolja
Copy link
Contributor

I started to look into the code of this project, and the tests failed randomly. Copying files from the template dir into the temporary dir is not awaited correctly.

Sometimes, the file copying is not fast enough, and the CLI fails because it cannot find or read the content of the "copied" pubspec.yaml.

For some reference on how forEach works on a Stream, click here. The new code uses a for loop, which awaits the processing of the stream elements.

- use `for` loop instead of `forEach` to await copying of each file
@f3ath
Copy link
Owner

f3ath commented Jan 12, 2024

Awesome, thank you!

@f3ath f3ath merged commit ac25b19 into f3ath:master Jan 12, 2024
1 check passed
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