Skip to content
Merged
Show file tree
Hide file tree
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
34 changes: 12 additions & 22 deletions pkgs/c_compiler/lib/src/utils/run_process.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,35 +99,25 @@ Future<RunProcessResult> runProcess({
return result;
}

class RunProcessResult extends ProcessResult {
final String command;

final int _exitCode;

// For some reason super.exitCode returns 0.
@override
int get exitCode => _exitCode;
/// Drop in replacement of [ProcessResult].
class RunProcessResult {
final int pid;

final String _stderrString;
final String command;

@override
String get stderr => _stderrString;
final int exitCode;

final String _stdoutString;
final String stderr;

@override
String get stdout => _stdoutString;
final String stdout;

RunProcessResult({
required int pid,
required this.pid,
required this.command,
required int exitCode,
required String stderr,
required String stdout,
}) : _exitCode = exitCode,
_stderrString = stderr,
_stdoutString = stdout,
super(pid, exitCode, stdout, stderr);
required this.exitCode,
required this.stderr,
required this.stdout,
});

@override
String toString() => '''command: $command
Expand Down
2 changes: 1 addition & 1 deletion pkgs/c_compiler/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 0.1.0-dev
repository: https://github.com/dart-lang/native/tree/main/pkgs/c_compiler

environment:
sdk: ">=2.19.3 <4.0.0"
sdk: ">=3.0.0 <4.0.0"

publish_to: none

Expand Down
2 changes: 1 addition & 1 deletion pkgs/native_assets_cli/example/native_add/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version: 0.1.0
repository: https://github.com/dart-lang/native/tree/main/pkgs/native_assets_cli/example/native_add

environment:
sdk: ">=2.19.3 <4.0.0"
sdk: ">=3.0.0 <4.0.0"

dependencies:
c_compiler:
Expand Down
2 changes: 1 addition & 1 deletion pkgs/native_assets_cli/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 0.1.0-dev
repository: https://github.com/dart-lang/native/tree/main/pkgs/native_assets_cli

environment:
sdk: ">=2.19.3 <4.0.0"
sdk: ">=3.0.0 <4.0.0"

dependencies:
cli_config: ^0.1.1
Expand Down