From 336e959476ecc0baf2c65100107f7a4c337858cf Mon Sep 17 00:00:00 2001 From: Toki Date: Tue, 24 Jan 2023 21:40:21 +0900 Subject: [PATCH] update process --- lib/core/process.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/core/process.dart b/lib/core/process.dart index c139e32..159fc0d 100644 --- a/lib/core/process.dart +++ b/lib/core/process.dart @@ -116,7 +116,7 @@ class ProcessExecutor { try { var processData = ProcessData(); var fileName = DateTime.now(); - if (Platform.isMacOS) { + if (Platform.isMacOS || Platform.isLinux) { workspace = workspace ?? Directory.current.path; var file = File('$workspace/temp_${fileName.microsecondsSinceEpoch}.sh'); @@ -165,7 +165,7 @@ class ProcessExecutor { {String? workspace, bool printStdout = true}) async { var c = Completer(); ProcessResult? processResult; - if (Platform.isMacOS) { + if (Platform.isMacOS || Platform.isLinux) { workspace = workspace ?? Directory.current.path; var file = File('$workspace/temp.sh'); print('Execute Shell: ${file.path} \n ${shell.toString()}'); @@ -214,7 +214,7 @@ class ProcessExecutor { } static bool getSuccess(int exitCode) { - if (Platform.isMacOS) return exitCode == 0; + if (Platform.isMacOS || Platform.isLinux) return exitCode == 0; if (Platform.isWindows) return exitCode == 1; return false; }