Skip to content

flutter build is returning zero, should return not zero ? #5797

Closed

Description

@sethladd

flutter build doesn't do anything other than print the help. We might not want to return zero there. Instead, I'd expect some non-zero code.

For example, this will run the second command, which I didn't expect:

flutter build && flutter install

The second command should not run because the first was not successful, however the first command returned zero.

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Sep 9, 2016
  2. Hixie commented on Sep 9, 2016

    @Hixie
    Contributor

    build should probably default to whatever we would build if we were using flutter run.
    also, install should imply build anyway.

  3. modified the milestone: on Sep 12, 2016
  4. eseidelGoogle commented on Feb 8, 2017

    @eseidelGoogle
    Contributor

    This is definitely a real bug (note that git alone exits with 1, etc.). Probably a very easy fix. I suspect the Build command shouldn't implement run(), not sure. This might also be a bug in package:args.

  5. Riyuzakii commented on Feb 16, 2017

    @Riyuzakii

    @eseidelGoogle This is my first time on github, and i would like to help fix this bug, if you would be kind enough to guide me through it.

  6. eseidelGoogle commented on Feb 16, 2017

    @eseidelGoogle
    Contributor

    @Riyuzakii https://github.com/flutter/flutter/blob/master/CONTRIBUTING.md are possibly helpful? Also, many of our engineers are reachable via gitter.im/flutter/flutter if chat would be helpful.

  7. added a commit that references this issue on Jul 19, 2018
  8. added a commit that references this issue on Jul 19, 2018
  9. modified the milestones: , on Jan 7, 2020
  10. jmagman commented on Jan 13, 2020

    @jmagman
    Member

    See the special-casing of missing build subcommands --> -h instead of throwing a usage error.
    39efe4a#diff-328b603a46fc45c62aab3ff4458b99e1R178

  11. added
    P3Issues that are less important to the Flutter project
    on May 29, 2020
  12. 4 remaining items

  13. removed this from the milestone on Jul 7, 2020
  14. modified the milestone: on Jul 22, 2020
  15. removed this from the milestone on Aug 17, 2020
  16. added
    tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.
    on Jun 30, 2025
  17. added 2 commits that reference this issue on Sep 24, 2025
    bf5bf12
    8bf090b
  18. added a commit that references this issue on Dec 7, 2025
    66abe05
  19. added a commit that references this issue on Dec 12, 2025
    4de6fcc
  20. added a commit that references this issue on Dec 19, 2025
    c04c46c
  21. github-actions commented on Dec 26, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  22. locked as resolved and limited conversation to collaborators on Dec 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions