process_run 0.1.0

  • Readme
  • Changelog
  • Installing
  • 45

process_run.dart #

Process run helpers for Linux/Win/Mac

Build Status

Usage #

process_run #

Additional options to are

  • connecting stdin
  • connecting stdout
  • connecting sterr

dartbin #

Helper to format dart binaries argument that works cross-platforms

  • dart2js
  • pub
  • dartfmt
  • dartanalyzer
  • dartoc

Sample usage #

import 'package:process_run/process_run.dart';
import 'package:process_run/dartbin.dart';

main() async {
  // Simple echo command
  // Somehow windows requires runInShell for the system commands
  bool runInShell = Platform.isWindows;

  // Run the command
  await run('echo', ['hello world'], runInShell: runInShell);

  // Stream the out to stdout
  await run('echo', ['hello world'],
      runInShell: runInShell, connectStdout: true);

  // Calling dart
  await run(dartExecutable, ['--version']);

  // stream the output to stderr
  await run(dartExecutable, ['--version'], connectStderr: true);

  // Listing global activated packages
  await run(dartExecutable, pubArguments(['global', 'list']),
      connectStdout: true);

Limitations #

As noted in the example, windows requires runInShell for system commands (echo, type) but not for regular executables (dart, git...)

Changelog #

0.1.0 #

  • Initial version, executor and dartbin utilities

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  process_run: ^0.1.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:process_run/process_run.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

This package version is not analyzed, because it is more than two years old. Check the latest stable version for its analysis.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <2.0.0