From 058110a7931260cbdca7669ad868370dc91a9fd1 Mon Sep 17 00:00:00 2001 From: Toki Date: Tue, 31 Dec 2024 09:16:25 +0900 Subject: [PATCH] test --- lib/oto/commands/shell/shell.dart | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/oto/commands/shell/shell.dart b/lib/oto/commands/shell/shell.dart index 9311e2e..42001b1 100644 --- a/lib/oto/commands/shell/shell.dart +++ b/lib/oto/commands/shell/shell.dart @@ -15,19 +15,18 @@ class Shell extends Command { shell.write(' && $item'); } + var process = + await ProcessExecutor.start(shell, logHandler: Application.logWithType); if (data.setMessage == null) { - var process = await ProcessExecutor.start(shell, - logHandler: Application.logWithType); return await completeProcess(process, command); } else { - var process = - await ProcessExecutor.run(shell, logHandler: Application.logWithType); + await process.waitForExit(); var str = process.stdout.toString(); print('====================> $str'); var length = str.length; str = str.substring(0, length - 1); await setProperty(data.setMessage!, str); - return await complete(process.exitCode, command); + return await complete(process.exitCode!, command); } } }