INNER CODE UNIT · Ruby

run

EugenMayer/docker-sync · lib/docker-sync/docker_compose_session.rb:34

    def run!(*args)
      # file_args and args should be Array of String
      file_args = @files.map { |file| "--file=#{file}" }

      if docker_compose_legacy_binary_exists?
        command = 'docker-compose'
        command_args = file_args + args
      else
        command = 'docker'
        command_args = ['compose'] + file_args + args
      end

      @last_command = Command.run(command, *command_args, dir: @dir).join
      status = @last_command.status
      out = @last_command.captured_output
      err = @last_command.captured_error
      unless status.success?
        desc = (out + err).strip.lines.first || '(no output)'

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…