From 767216901af4b881e508bf5d2605b4d34d565853 Mon Sep 17 00:00:00 2001 From: jordanbreen28 Date: Wed, 26 Jul 2023 12:44:28 +0000 Subject: [PATCH] (CAT-1249) - Fix Spinner on Windows Hosts This commit fixes an incompatibility issue with windows hosts and tty spinner. --- lib/puppet_litmus/rake_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/puppet_litmus/rake_helper.rb b/lib/puppet_litmus/rake_helper.rb index a83f302d..a33e7be7 100644 --- a/lib/puppet_litmus/rake_helper.rb +++ b/lib/puppet_litmus/rake_helper.rb @@ -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. @@ -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