Skip to content

Commit

Permalink
Debug output fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Serghei Moret committed Mar 20, 2021
1 parent daa27dd commit f64fa77
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
fastlane-plugin-mango (1.3.22)
fastlane-plugin-mango (1.3.23)
docker-api

GEM
Expand Down
10 changes: 7 additions & 3 deletions lib/fastlane/plugin/mango/actions/run_dockerized_task_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ def self.run(params)
docker_commander.exec(command: "cd #{workspace_dir} #{bundle_install}&& #{timeout_command} #{android_task} || exit 1")
end
rescue StandardError => e
docker_commander.exec(command: "docker logs #{mango_helper.container_name} --tail 200", raise_when_fail: false)
begin
Actions.sh("docker logs #{mango_helper.container_name} --tail 200")
rescue StandardError
# do nothing
end
docker_commander.exec(command:
"docker exec -i #{mango_helper.container_name} cat /var/log/supervisor/docker-android.stderr.log", raise_when_fail: false)
docker_commander.exec(command: "docker exec -i #{mango_helper.container_name} cat /var/log/supervisor/supervisord.log",
'cat /var/log/supervisor/docker-android.stderr.log', raise_when_fail: false)
docker_commander.exec(command: 'cat /var/log/supervisor/supervisord.log',
raise_when_fail: false)
raise e
ensure
Expand Down
2 changes: 1 addition & 1 deletion lib/fastlane/plugin/mango/helper/docker_commander.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def disconnect_network_bridge
def exec(command:, raise_when_fail: true)
if container_name
begin
Actions.sh("docker exec -i #{container_name} bash -l -c \"#{command}\"")
Actions.sh("docker exec #{container_name} bash -l -c \"#{command}\"")
rescue StandardError => e
raise(e) if raise_when_fail
end
Expand Down
2 changes: 1 addition & 1 deletion lib/fastlane/plugin/mango/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Fastlane
module Mango
VERSION = '1.3.22'.freeze
VERSION = '1.3.23'.freeze
end
end

0 comments on commit f64fa77

Please sign in to comment.