lib/minke/tasks/task.rb in minke-1.13.20 vs lib/minke/tasks/task.rb in minke-1.14.0

- old
+ new

@@ -61,11 +61,11 @@ abort unless success end ## # runs the given command in a docker container - def run_command_in_container command + def run_command_in_container command, blocking = false begin @logger.info "Running command: #{command}" settings = @generator_config.build_settings.docker_settings volumes = settings.binds.clone unless settings.binds == nil environment = settings.env.clone unless settings.env == nil @@ -83,10 +83,15 @@ :command => command, :volumes => volumes, :environment => environment, :working_directory => working_directory } - container, success = @docker_runner.create_and_run_container args + + if blocking == false + container, success = @docker_runner.create_and_run_container args + else + container, success = @docker_runner.create_and_run_blocking_container args + end # throw exception if failed raise "Unable to run command #{command}" unless success ensure @docker_runner.delete_container container