Summary
Every CLI command's --project-dir option defaults to 'mobile':
$ grep -rn "project-dir" bin/flutter_tools.dart | grep "defaultsTo: 'mobile'"
bin/flutter_tools.dart:67: ..addOption('project-dir', defaultsTo: 'mobile')
bin/flutter_tools.dart:144: ..addOption('project-dir', defaultsTo: 'mobile')
bin/flutter_tools.dart:299: ..addOption('project-dir', defaultsTo: 'mobile', help: 'Flutter app dir.')
bin/flutter_tools.dart:382: ..addOption('project-dir', defaultsTo: 'mobile')
bin/flutter_tools.dart:542: ..addOption('project-dir', defaultsTo: 'mobile')
bin/flutter_tools.dart:596: ..addOption('project-dir', defaultsTo: 'mobile')
bin/flutter_tools.dart:856: ..addOption('project-dir', defaultsTo: 'mobile')
bin/flutter_tools.dart:946: ..addOption('project-dir', defaultsTo: 'mobile')
For a root-level Flutter app (the app is the repo root, not a mobile/ subdirectory —
the common case for a standalone consumer of this tool), the silent default points the
command at a directory that doesn't exist, producing a confusing downstream error instead
of a clear "you probably meant --project-dir ." message. This was already hit for real by
vaam-store/mobile (fixed locally there via
vaam-store/mobile#20-equivalent — fix(ci): pass project-dir '.' to android-setup/build actions — a workaround in the consumer, not a fix here).
Recommendation on record
Default to '.' (the common case for a standalone app), or fail loudly with a clear error
naming the missing directory and suggesting --project-dir explicitly, rather than
defaulting to a directory name ('mobile') that only made sense for this tool's own
original consumer.
Scope
Source of truth
grep -rn "project-dir" bin/flutter_tools.dart output above, 2026-08-18; the actual
downstream breakage this caused, vaam-store/mobile's own CI history (fix commit
"fix(ci): pass project-dir '.' to android-setup/build actions", 2026-08-18).
Summary
Every CLI command's
--project-diroption defaults to'mobile':For a root-level Flutter app (the app is the repo root, not a
mobile/subdirectory —the common case for a standalone consumer of this tool), the silent default points the
command at a directory that doesn't exist, producing a confusing downstream error instead
of a clear "you probably meant
--project-dir ." message. This was already hit for real byvaam-store/mobile(fixed locally there viavaam-store/mobile#20-equivalent —fix(ci): pass project-dir '.' to android-setup/build actions— a workaround in the consumer, not a fix here).Recommendation on record
Default to
'.'(the common case for a standalone app), or fail loudly with a clear errornaming the missing directory and suggesting
--project-direxplicitly, rather thandefaulting to a directory name (
'mobile') that only made sense for this tool's ownoriginal consumer.
Scope
builder so this can't drift again — 8 independent literals is itself a smell).
'.'vs. fail-loudly (both fix the silent-wrong-path problem; pick one).docs/RELEASING.md/README.mdexamples if they assume the old default.Source of truth
grep -rn "project-dir" bin/flutter_tools.dartoutput above, 2026-08-18; the actualdownstream breakage this caused,
vaam-store/mobile's own CI history (fix commit"fix(ci): pass project-dir '.' to android-setup/build actions", 2026-08-18).