Skip to content

[ios][tool] xcode_backend logging shouldn't rely on exitCode #174079

@hellohuanlin

Description

@hellohuanlin

We have this code:

// Stream stderr to the Flutter build process.
// When in verbose mode, `echoError` above will show the logs. So only
// stream if not in verbose mode to avoid duplicate logs.
// Also, only stream if exitCode is 0 since errors are handled separately
// by the tool on failure.
if (!verbose && exitCode == 0) {
streamOutput(errorOutput.toString());
}

We check exitCode of current process, not result.exitCode of the subprocess (e.g. plutil).

I think this check shouldn't be necessary, because if exitCode is not 0, then the current process is already terminated (xcode_backend never change its own exitCode without exiting the process).

It should be safe to just do

if (!verbose) {
  // ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listplatform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions