process_run 1.2.2 process_run: ^1.2.2 copied to clipboard
Process run helpers for Linux/Win/Mac and which like feature for finding executables.
import 'dart:async';
import 'package:process_run/shell.dart';
Future main() async {
// This works on Windows/Linux/Mac
var shell = Shell();
await shell.run('''
# Display some text
echo Hello
# Display dart version
dart --version
# Display pub version
pub --version
''');
shell = shell.pushd('example');
await shell.run('''
# Listing directory in the example folder
dir
''');
shell = shell.popd();
}