From c487d6fc8d797ddfe0334939c5b274d7240a7903 Mon Sep 17 00:00:00 2001 From: leedongmyung Date: Sun, 12 Nov 2023 21:24:19 +0900 Subject: [PATCH] test --- lib/oto/application.dart | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/lib/oto/application.dart b/lib/oto/application.dart index 4151bd5..1928817 100644 --- a/lib/oto/application.dart +++ b/lib/oto/application.dart @@ -53,21 +53,17 @@ class Application { ]).then((ProcessResult result) => jsonStr = result.stdout); jenkinsMap = getMapFromJson(jsonStr)!; } else if (Platform.isWindows) { - List? stdout; - List? stderr; - await Process.run( - 'cmd', - [ - '/C', - '${Directory.current.path}/assets/script/batch/jenkins_env_params.bat' - ], - stdoutEncoding: Encoding.getByName('euc-kr'), - stderrEncoding: Encoding.getByName('euc-kr')) - .then((ProcessResult result) { + String? stdout; + String? stderr; + await Process.run('cmd', [ + '/C', + '${Directory.current.path}/assets/script/batch/jenkins_env_params.bat' + ]).then((ProcessResult result) { stdout = result.stdout; stderr = result.stderr; }); - jsonStr = eucKr.decode(stdout!).replaceAll('\\', '/'); + List bytes = utf8.encode(stdout!); + jsonStr = eucKr.decode(bytes).replaceAll('\\', '/'); jenkinsMap = getMapFromJson(jsonStr); } else { enable = false;