process 5.0.6 copy "process: ^5.0.6" to clipboard
process: ^5.0.6 copied to clipboard

A pluggable, mockable process invocation abstraction for Dart.

example/main.dart

// Copyright (c) 2026, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:io';

import 'package:process/process.dart';

Future<void> main() async {
  const processManager = LocalProcessManager();

  final executable = Platform.resolvedExecutable;
  if (!processManager.canRun(executable)) {
    stderr.writeln('Unable to run: $executable');
    exitCode = 1;
    return;
  }

  final result = await processManager.run([executable, '--version']);
  stdout.write(result.stdout);
  if (result.exitCode != 0) {
    stderr.writeln('Command failed with exit code ${result.exitCode}.');
    stderr.write(result.stderr);
    exitCode = result.exitCode;
  }
}
44
likes
160
points
8.55M
downloads

Documentation

API reference

Publisher

verified publishertools.dart.dev

Weekly Downloads

A pluggable, mockable process invocation abstraction for Dart.

Repository (GitHub)
View/report issues
Contributing

Topics

#process

License

BSD-3-Clause (license)

Dependencies

file, path, platform

More

Packages that depend on process