Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 70e2a25

Browse files
committed
Fix resolution.
1 parent 5c3c5af commit 70e2a25

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/githooks/lib/src/pre_push_command.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,12 @@ class PrePushCommand extends Command<bool> {
102102
/// ... then the returned file will be `out/host_debug/compile_commands.json`.
103103
@visibleForTesting
104104
static io.File? findMostRelevantCompileCommands(String flutterRoot, {required bool verbose}) {
105+
final String engineRoot = path.normalize(path.join(flutterRoot, '../'));
106+
105107
// Create a list of all the compile_commands.json files that exist,
106108
// including their last modified time.
107109
final List<(io.File, DateTime)> compileCommandsFiles = supportedHostTargets
108-
.map((String target) => io.File(path.join(flutterRoot, 'out', target, 'compile_commands.json')))
110+
.map((String target) => io.File(path.join(engineRoot, 'out', target, 'compile_commands.json')))
109111
.where((io.File file) => file.existsSync())
110112
.map((io.File file) => (file, file.lastModifiedSync()))
111113
.toList();

0 commit comments

Comments
 (0)