From 1fc104dc636f53e90952c1f1e26d1e9d4a73759c Mon Sep 17 00:00:00 2001 From: Vladyslav Androshchuk Date: Tue, 23 Jul 2024 12:16:53 +0200 Subject: [PATCH] Fix multiline string cmd for prepare_apk --- .../plugin/bundletool/actions/bundletool_action.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/fastlane/plugin/bundletool/actions/bundletool_action.rb b/lib/fastlane/plugin/bundletool/actions/bundletool_action.rb index 0bf903c..78cee2a 100644 --- a/lib/fastlane/plugin/bundletool/actions/bundletool_action.rb +++ b/lib/fastlane/plugin/bundletool/actions/bundletool_action.rb @@ -120,9 +120,11 @@ def self.prepare_apk!(output_path, target_path) puts_important("Creating path #{target_dir_name} since does not exist") FileUtils.mkdir_p target_dir_name end - cmd = "mv \"#{output_path}\" \"#{@bundletool_temp_path}/output.zip\" && - unzip \"#{@bundletool_temp_path}/output.zip\" -d \"#{@bundletool_temp_path}\" && - mv \"#{@bundletool_temp_path}/universal.apk\" \"#{target_path}\"" + + cmd = "mv \"#{output_path}\" \"#{@bundletool_temp_path}/output.zip\" &&"\ + "unzip \"#{@bundletool_temp_path}/output.zip\" -d \"#{@bundletool_temp_path}\" &&"\ + "mv \"#{@bundletool_temp_path}/universal.apk\" \"#{target_path}\"" + Open3.popen3(cmd) do |_, _, stderr, wait_thr| exit_status = wait_thr.value raise stderr.read unless exit_status.success?