update process
This commit is contained in:
parent
79296728ac
commit
336e959476
1 changed files with 3 additions and 3 deletions
|
|
@ -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? 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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue