Skip to content

flutter build <DIRECTORY> doesn't use <DIRECTORY> #11739

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task
zzzjim opened this issue Feb 24, 2025 · 3 comments
Open
1 task

flutter build <DIRECTORY> doesn't use <DIRECTORY> #11739

zzzjim opened this issue Feb 24, 2025 · 3 comments
Assignees
Labels
e1-hours Effort: < 8 hrs from.page-issue Reported in a reader-filed concern p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface.

Comments

@zzzjim
Copy link

zzzjim commented Feb 24, 2025

Page URL

https://docs.flutter.dev/reference/flutter-cli/

Page source

https://github.com/flutter/website/tree/main/src/content/reference/flutter-cli.md

Describe the problem

flutter create --platforms=ios my_app
flutter build ios-framework ./my_app
Error: No pubspec.yaml file found.
This command should be run from the root of your Flutter project.

Tried we also
flutter create --platforms=web my_app
flutter build web ./my_app/
Error: No pubspec.yaml file found.
This command should be run from the root of your Flutter project.

Expected fix

Either remove from documentation or fix tools to change into the directory specified.

Additional context

No response

I would like to fix this problem.

  • I will try and fix this problem on docs.flutter.dev.
@zzzjim zzzjim added the from.page-issue Reported in a reader-filed concern label Feb 24, 2025
@sfshaza2
Copy link
Contributor

sfshaza2 commented Mar 4, 2025

Thanks for filing this, @zzzjim, but I actually disagree. Unix command (and this is, essentially, a Unix command) should never change directories willy nilly. The error text is pretty clear on what is required here. Closing.

@sfshaza2 sfshaza2 closed this as completed Mar 4, 2025
@zzzjim
Copy link
Author

zzzjim commented Mar 5, 2025

Most common Unix build tools allow specifying a directory

make -C

cmake -B

ninja -C

The flutter docs show

flutter build DIRECTORY

doesn't work, it does nothing.
It is not mentioned in
flutter build --help

Why not remove if it doesn't work?

@sfshaza2 sfshaza2 reopened this Mar 5, 2025
@sfshaza2
Copy link
Contributor

sfshaza2 commented Mar 5, 2025

OK, that's a different issue. :)

@sfshaza2 sfshaza2 self-assigned this Mar 5, 2025
@sfshaza2 sfshaza2 added p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface. e1-hours Effort: < 8 hrs labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e1-hours Effort: < 8 hrs from.page-issue Reported in a reader-filed concern p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface.
Projects
None yet
Development

No branches or pull requests

2 participants