@@ -129,9 +129,11 @@ class SubprocessLauncher {
129
129
130
130
if (exitCode != 0 ) {
131
131
throw SubprocessException (
132
- command: [executable, ...arguments].join (' ' ),
133
- workingDirectory: workingDirectory,
134
- exitCode: exitCode);
132
+ command: [executable, ...arguments].join (' ' ),
133
+ workingDirectory: workingDirectory,
134
+ exitCode: exitCode,
135
+ environment: environment,
136
+ );
135
137
}
136
138
return jsonObjects;
137
139
}
@@ -182,15 +184,19 @@ class SubprocessException implements Exception {
182
184
final String command;
183
185
final String ? workingDirectory;
184
186
final int exitCode;
187
+ final Map <String , String > environment;
185
188
186
- SubprocessException (
187
- {required this .command,
188
- required this .workingDirectory,
189
- required this .exitCode});
189
+ SubprocessException ({
190
+ required this .command,
191
+ required this .workingDirectory,
192
+ required this .environment,
193
+ required this .exitCode,
194
+ });
190
195
191
196
@override
192
197
String toString () => 'SubprocessException['
193
198
'command: "$command ", '
194
199
'workingDirectory: "${workingDirectory ?? '(null)' }", '
195
- 'exitCode: $exitCode ]' ;
200
+ 'exitCode: $exitCode , '
201
+ 'environment: $environment ]' ;
196
202
}
0 commit comments