We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
create_configs
1 parent c17d378 commit 93e8135Copy full SHA for 93e8135
infra/tool/create_configs.dart
@@ -25,14 +25,18 @@ const exampleApps = {
25
26
late final Directory repoRoot = () {
27
Directory dir = Directory.current;
28
+ Directory? rootDir;
29
while (p.absolute(dir.parent.path) != p.absolute(dir.path)) {
30
final files = dir.listSync().whereType<File>();
- if (files.any((f) => p.basename(f.path) == 'aft.yaml')) {
31
- return dir;
+ if (files.any((f) => p.basename(f.path) == 'pubspec.yaml')) {
32
+ rootDir = dir;
33
}
34
dir = dir.parent;
35
- throw StateError('Could not locate repo root');
36
+ if (rootDir == null) {
37
+ throw StateError('Could not locate repo root');
38
+ }
39
+ return rootDir;
40
}();
41
42
void main() {
0 commit comments