Skip to content

Commit

Permalink
ci: Fix failing native tests (#3404)
Browse files Browse the repository at this point in the history
chore(aft): Fix failing native tests

Fixes issue on Windows with checking the `.dart_tool` directory by always running `pub get`.
  • Loading branch information
dnys1 authored and Dillon Nys committed Jul 27, 2023
1 parent 33323e3 commit 522e6c1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/aft/lib/src/commands/publish_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,13 @@ Future<void> runBuildRunner(
if (!package.needsBuildRunner && !force) {
return;
}
final dartTool = Directory(p.join(package.path, '.dart_tool'));
if (!dartTool.existsSync()) {
await runPub(package.flavor, ['get'], package);
}
// Run `pub get` to ensure `build_runner` is available.
await runPub(
package.flavor,
['get'],
package,
verbose: verbose,
);
logger.debug('Running build_runner for ${package.name}...');
final buildRunnerCmd = await Process.start(
package.flavor.entrypoint,
Expand All @@ -283,6 +286,7 @@ Future<void> runBuildRunner(
'build',
'--delete-conflicting-outputs',
],
runInShell: true,
workingDirectory: package.path,
);
final output = StringBuffer();
Expand Down

0 comments on commit 522e6c1

Please sign in to comment.