Sha256: 1dc23f2b8bbf2f879ee428f262c759c6391ca63f1c9fe1a86609bddb7ce97f52

Contents?: true

Size: 489 Bytes

Versions: 42

Compression:

Stored size: 489 Bytes

Contents

# frozen_string_literal: true

require "shopify_cli"

module Script
  module UI
    module StrictSpinner
      def self.spin(title, auto_debrief: false)
        exception = nil
        CLI::UI::Spinner.spin(title, auto_debrief: auto_debrief) do |*args|
          begin
            yield(*args)
          rescue StandardError => e
            exception = e
            CLI::UI::Spinner::TASK_FAILED
          end
        end
        raise exception if exception
      end
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
shopify-cli-2.12.0 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.11.2 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.11.1 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.11.0 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.10.2 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.10.1 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.10.0 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.9.0 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.8.0 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.7.4 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.7.3 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.7.2 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.7.1 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.7.0 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.6.6 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.6.5 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.6.4 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.6.3 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.6.2 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.6.1 lib/project_types/script/ui/strict_spinner.rb