Sha256: 244b8d43ff15e0ad239d1f10ce16c5841497f8420c9de3128a7be4a4fb42f979

Contents?: true

Size: 451 Bytes

Versions: 22

Compression:

Stored size: 451 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|
          yield(*args)
        rescue StandardError => e
          exception = e
          CLI::UI::Spinner::TASK_FAILED
        end
        raise exception if exception
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
shopify-cli-2.25.0 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.24.0 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.23.0 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.22.0 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.21.0 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.20.1 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.20.0 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.19.0 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.18.1 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.18.0 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.17.0 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.16.1 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.16.0 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.15.6 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.15.5 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.15.4 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.15.3 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.15.2 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.15.1 lib/project_types/script/ui/strict_spinner.rb
shopify-cli-2.15.0 lib/project_types/script/ui/strict_spinner.rb