code refactoring
This commit is contained in:
parent
a66ce6ee5c
commit
000b2e1f10
1 changed files with 4 additions and 4 deletions
|
|
@ -100,10 +100,10 @@ class ProcessData {
|
|||
|
||||
class ProcessExecutor {
|
||||
static Future<ProcessData> startExe(String exe, List<String> args,
|
||||
{String? workspace, bool? enableStdout, bool? enableStderr}) async {
|
||||
{String? workspace, bool? printStdout, bool? printStderr}) async {
|
||||
var c = Completer<ProcessData>();
|
||||
var arg = '$exe ${args.join(' ')}';
|
||||
var processData = ProcessData(enableStdout ?? true, enableStderr ?? true);
|
||||
var processData = ProcessData(printStdout ?? true, printStderr ?? true);
|
||||
if (Platform.isMacOS || Platform.isWindows) {
|
||||
workspace = workspace ?? Directory.systemTemp.path;
|
||||
print('Execute Shell: $arg');
|
||||
|
|
@ -121,10 +121,10 @@ class ProcessExecutor {
|
|||
}
|
||||
|
||||
static Future<ProcessData> start(StringBuffer shell,
|
||||
{String? workspace, bool? enableStdout, bool? enableStderr}) async {
|
||||
{String? workspace, bool? printStdout, bool? printStderr}) async {
|
||||
var c = Completer<ProcessData>();
|
||||
try {
|
||||
var processData = ProcessData(enableStdout ?? true, enableStderr ?? true);
|
||||
var processData = ProcessData(printStdout ?? true, printStderr ?? true);
|
||||
if (Platform.isMacOS || Platform.isLinux) {
|
||||
workspace = workspace ?? Directory.systemTemp.path;
|
||||
var file = File('$workspace/$tempFileName');
|
||||
|
|
|
|||
Loading…
Reference in a new issue