execute method
bool
execute(
- ReleasePacker releasePacker,
- Directory rootDirectory, {
- ReleaseBundle? releaseBundle,
- int expectedExitCode = 0,
override
Implementation
@override
bool execute(ReleasePacker releasePacker, Directory rootDirectory,
{ReleaseBundle? releaseBundle, int expectedExitCode = 0}) {
var dartPath = whichExecutablePath('dart');
print(
' » Dart command> ${rootDirectory.path} -> $dartPath $command $args');
var result = Process.runSync(dartPath, [command, ...args],
workingDirectory: rootDirectory.path);
var exitCode = result.exitCode;
var ok = exitCode == expectedExitCode;
if (!ok) {
print(
' ▒ Dart command error! exitCode: $exitCode ; command: $command $args');
print(result.stdout);
print(result.stderr);
}
return ok;
}