Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions tool/src/subprocess_launcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,11 @@ class SubprocessLauncher {

if (exitCode != 0) {
throw SubprocessException(
command: [executable, ...arguments].join(' '),
workingDirectory: workingDirectory,
exitCode: exitCode);
command: [executable, ...arguments].join(' '),
workingDirectory: workingDirectory,
exitCode: exitCode,
environment: environment,
);
}
return jsonObjects;
}
Expand Down Expand Up @@ -182,15 +184,19 @@ class SubprocessException implements Exception {
final String command;
final String? workingDirectory;
final int exitCode;
final Map<String, String> environment;

SubprocessException(
{required this.command,
required this.workingDirectory,
required this.exitCode});
SubprocessException({
required this.command,
required this.workingDirectory,
required this.environment,
required this.exitCode,
});

@override
String toString() => 'SubprocessException['
'command: "$command", '
'workingDirectory: "${workingDirectory ?? '(null)'}", '
'exitCode: $exitCode]';
'exitCode: $exitCode, '
'environment: $environment]';
}