mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Include stdout in codesign failure output (#115115)
This commit is contained in:
parent
1f891a0f33
commit
c1ceda41ef
@ -711,6 +711,16 @@ void _signFramework(Environment environment, String binaryPath, BuildMode buildM
|
|||||||
binaryPath,
|
binaryPath,
|
||||||
]);
|
]);
|
||||||
if (result.exitCode != 0) {
|
if (result.exitCode != 0) {
|
||||||
throw Exception('Failed to codesign $binaryPath with identity $codesignIdentity.\n${result.stderr}');
|
final String stdout = (result.stdout as String).trim();
|
||||||
|
final String stderr = (result.stderr as String).trim();
|
||||||
|
final StringBuffer output = StringBuffer();
|
||||||
|
output.writeln('Failed to codesign $binaryPath with identity $codesignIdentity.');
|
||||||
|
if (stdout.isNotEmpty) {
|
||||||
|
output.writeln(stdout);
|
||||||
|
}
|
||||||
|
if (stderr.isNotEmpty) {
|
||||||
|
output.writeln(stderr);
|
||||||
|
}
|
||||||
|
throw Exception(output.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -836,13 +836,17 @@ void main() {
|
|||||||
lipoCommandNonFatResult,
|
lipoCommandNonFatResult,
|
||||||
lipoVerifyArm64Command,
|
lipoVerifyArm64Command,
|
||||||
FakeCommand(command: <String>[
|
FakeCommand(command: <String>[
|
||||||
'codesign',
|
'codesign',
|
||||||
'--force',
|
'--force',
|
||||||
'--sign',
|
'--sign',
|
||||||
'ABC123',
|
'ABC123',
|
||||||
'--timestamp=none',
|
'--timestamp=none',
|
||||||
binary.path,
|
binary.path,
|
||||||
], exitCode: 1, stderr: 'codesign error'),
|
],
|
||||||
|
exitCode: 1,
|
||||||
|
stderr: 'codesign error',
|
||||||
|
stdout: 'codesign info',
|
||||||
|
),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
await expectLater(
|
await expectLater(
|
||||||
@ -850,7 +854,7 @@ void main() {
|
|||||||
throwsA(isException.having(
|
throwsA(isException.having(
|
||||||
(Exception exception) => exception.toString(),
|
(Exception exception) => exception.toString(),
|
||||||
'description',
|
'description',
|
||||||
contains('Failed to codesign output/Flutter.framework/Flutter with identity ABC123.\ncodesign error'),
|
contains('Failed to codesign output/Flutter.framework/Flutter with identity ABC123.\ncodesign info\ncodesign error'),
|
||||||
)),
|
)),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user