Print sub process that failed to run in tool (#120999)
This commit is contained in:
@@ -667,7 +667,10 @@ class ErrorHandlingProcessManager extends ProcessManager {
|
||||
stdoutEncoding: stdoutEncoding,
|
||||
stderrEncoding: stderrEncoding,
|
||||
);
|
||||
}, platform: _platform);
|
||||
},
|
||||
platform: _platform,
|
||||
failureMessage: 'Flutter failed to run "${command.join(' ')}"',
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -688,7 +691,10 @@ class ErrorHandlingProcessManager extends ProcessManager {
|
||||
runInShell: runInShell,
|
||||
mode: mode,
|
||||
);
|
||||
}, platform: _platform);
|
||||
},
|
||||
platform: _platform,
|
||||
failureMessage: 'Flutter failed to run "${command.join(' ')}"',
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -711,7 +717,10 @@ class ErrorHandlingProcessManager extends ProcessManager {
|
||||
stdoutEncoding: stdoutEncoding,
|
||||
stderrEncoding: stderrEncoding,
|
||||
);
|
||||
}, platform: _platform);
|
||||
},
|
||||
platform: _platform,
|
||||
failureMessage: 'Flutter failed to run "${command.join(' ')}"',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -759,9 +768,11 @@ void _handleMacOSException(Exception e, String? message, int errorCode, String?
|
||||
const int ebadarch = 86;
|
||||
if (errorCode == ebadarch) {
|
||||
final StringBuffer errorBuffer = StringBuffer();
|
||||
errorBuffer.writeln(message);
|
||||
errorBuffer.writeln('This binary was built with the incorrect architecture to run on this machine.');
|
||||
errorBuffer.writeln('Flutter requires the Rosetta translation environment. If you are on an ARM Mac, try running:');
|
||||
if (message != null) {
|
||||
errorBuffer.writeln('$message.');
|
||||
}
|
||||
errorBuffer.writeln('The binary was built with the incorrect architecture to run on this machine.');
|
||||
errorBuffer.writeln('If you are on an ARM Apple Silicon Mac, Flutter requires the Rosetta translation environment. Try running:');
|
||||
errorBuffer.writeln(' sudo softwareupdate --install-rosetta --agree-to-license');
|
||||
_throwFileSystemException(errorBuffer.toString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user