diff --git a/lib/platform/process.dart b/lib/platform/process.dart index 9bccd57..4fa3d7d 100644 --- a/lib/platform/process.dart +++ b/lib/platform/process.dart @@ -94,7 +94,7 @@ class ProcessExecutor { var arg = '$exe ${args.join(' ')}'; var processData = ProcessData(); if (Platform.isMacOS || Platform.isWindows) { - workspace = workspace ?? Directory.current.path; + workspace = workspace ?? Directory.systemTemp.path; print('Execute Shell: $arg'); try { processData.processValue = @@ -116,7 +116,7 @@ class ProcessExecutor { try { var processData = ProcessData(); if (Platform.isMacOS || Platform.isLinux) { - workspace = workspace ?? Directory.current.path; + workspace = workspace ?? Directory.systemTemp.path; var file = File('$workspace/$tempFileName'); processData.file = file; print('Execute Shell: ${file.path} \n ${shell.toString()}'); @@ -132,7 +132,7 @@ class ProcessExecutor { print(e); } } else if (Platform.isWindows) { - workspace = workspace ?? Directory.current.path; + workspace = workspace ?? Directory.systemTemp.path; var file = File('$workspace/$tempFileName'); processData.file = file; print('Execute Shell: ${file.path} \n ${shell.toString()}'); @@ -163,7 +163,7 @@ class ProcessExecutor { var c = Completer(); ProcessResult? processResult; if (Platform.isMacOS || Platform.isLinux) { - workspace = workspace ?? Directory.current.path; + workspace = workspace ?? Directory.systemTemp.path; var file = File('$workspace/$tempFileName'); print('Execute Shell: ${file.path} \n ${shell.toString()}'); file.createSync(); @@ -186,7 +186,7 @@ class ProcessExecutor { } c.complete(processResult); } else if (Platform.isWindows) { - workspace = workspace ?? Directory.current.path; + workspace = workspace ?? Directory.systemTemp.path; var file = File('$workspace/$tempFileName'); print('Execute Bat: ${file.path} \n ${shell.toString()}'); file.createSync();