diff --git a/lib/oto/core/data_composer.dart b/lib/oto/core/data_composer.dart index a37a9fe..c4a45bc 100644 --- a/lib/oto/core/data_composer.dart +++ b/lib/oto/core/data_composer.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; +import 'package:dart_framework/utils/string_util.dart'; import 'package:dart_framework/utils/system_util.dart'; import 'package:oto_cli/cli/cli.dart'; import 'package:oto_cli/oto/application.dart'; @@ -51,8 +52,12 @@ class DataComposerJenkins extends DataComposer { ]).then((ProcessResult result) => jsonStr = result.stdout); jenkinsMap = getMapFromJson(jsonStr)!; - var shell = 'echo -e \$BuildData'; - await Process.run(shell, []).then((processResult) { + var shell = StringBuffer('echo -e \$BuildData'); + var fileTemp = File('${Directory.systemTemp}/temp_${getDates()}.sh'); + fileTemp.createSync(); + fileTemp.writeAsStringSync(shell.toString(), flush: true); + await Process.run(shellExe, [fileTemp.path]).then((processResult) { + fileTemp.deleteSync(); var file = File('/home/toki/jenkins/workspace/oto_cli_linux/build_data.yaml'); file.createSync();