lib/pdk/cli/exec_group.rb in pdk-1.13.0 vs lib/pdk/cli/exec_group.rb in pdk-1.14.0
- old
+ new
@@ -1,17 +1,15 @@
-require 'tty-which'
-
-require 'pdk/util'
-require 'pdk/cli/util/spinner'
-
module PDK
module CLI
class ExecGroup
def initialize(message, opts = {})
+ require 'pdk/cli/util'
@options = opts.merge(PDK::CLI::Util.spinner_opts_for_platform)
if PDK::CLI::Util.interactive?
+ require 'pdk/cli/util/spinner'
+
@spinner = if parallel?
TTY::Spinner::Multi.new("[:spinner] #{message}", @options)
else
TTY::Spinner.new("[:spinner] #{message}", @options)
end
@@ -39,9 +37,11 @@
block
end
end
def add_spinner(message, opts = {})
+ require 'pdk/cli/util'
+
return unless PDK::CLI::Util.interactive?
@spinner.register("[:spinner] #{message}", @options.merge(opts).merge(PDK::CLI::Util.spinner_opts_for_platform))
end
def exit_code