f3ath / cider

Tools for Dart package maintainers
https://pub.dev/packages/cider
MIT License
101 stars 17 forks source link

Fix: Test setup does not await file copying #68

Closed marvin-kolja closed 8 months ago

marvin-kolja commented 8 months ago

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.

f3ath commented 8 months ago

Awesome, thank you!