Skip to content

Commit

Permalink
(CAT-1249) - Fix Spinner on Windows Hosts
Browse files Browse the repository at this point in the history
This commit fixes an incompatibility issue with windows hosts and tty
spinner.
  • Loading branch information
jordanbreen28 committed Jul 26, 2023
1 parent 5aca3b8 commit 7672169
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/puppet_litmus/rake_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def raise_bolt_errors(result_set, error_msg)
end

def start_spinner(message)
if (ENV['CI'] || '').casecmp('true').zero?
if (ENV['CI'] || '').casecmp('true').zero? || Gem.win_platform?
puts message
spinner = Thread.new do
# CI systems are strange beasts, we only output a '.' every wee while to keep the terminal alive.
Expand All @@ -346,7 +346,7 @@ def start_spinner(message)
end

def stop_spinner(spinner)
if (ENV['CI'] || '').casecmp('true').zero?
if (ENV['CI'] || '').casecmp('true').zero? || Gem.win_platform?
Thread.kill(spinner)
else
spinner.success
Expand Down

0 comments on commit 7672169

Please sign in to comment.