From cb49951449c4ea44f9c4741833b3dd5ddf330a90 Mon Sep 17 00:00:00 2001 From: cdare Date: Tue, 4 Aug 2020 17:02:56 +0100 Subject: [PATCH] change ui.color calls to work with latest chef client --- lib/chef/knife/bastion_base.rb | 8 ++++---- lib/chef/knife/bastion_start.rb | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/chef/knife/bastion_base.rb b/lib/chef/knife/bastion_base.rb index 639ef3b..a6d6eb6 100644 --- a/lib/chef/knife/bastion_base.rb +++ b/lib/chef/knife/bastion_base.rb @@ -39,13 +39,13 @@ def tunnel_pid(local_port, raise_on_closed_port = true) def print_tunnel_info(header, timeout: nil, pid: nil) ui.info <<-INFO #{header} - * Bastion host: #{ui.color "#{@bastion_user}@#{@bastion_host}", [:bold, :white]} - * Chef host: #{ui.color @chef_host, [:bold, :white]} - * Local port: #{ui.color @local_port.to_s, [:bold, :white]} + * Bastion host: #{ui.color "#{@bastion_user}@#{@bastion_host}", :bold, :white} + * Chef host: #{ui.color @chef_host, :bold, :white} + * Local port: #{ui.color @local_port.to_s, :bold, :white} INFO if timeout ui.info <<-INFO - * Timeout: #{ui.color timeout.to_s, [:bold, :white]} seconds + * Timeout: #{ui.color timeout.to_s, :bold, :white} seconds INFO end if pid diff --git a/lib/chef/knife/bastion_start.rb b/lib/chef/knife/bastion_start.rb index ff265e3..8cea7f4 100644 --- a/lib/chef/knife/bastion_start.rb +++ b/lib/chef/knife/bastion_start.rb @@ -32,8 +32,8 @@ def run print_tunnel_info("Creating a tunnel to Chef server:", timeout: @timeout) - ui.info "Establishing connection to #{ui.color @bastion_host, [:bold, :white]}" - ui.warn "Please make sure to use your #{ui.color @bastion_network, [:bold, :magenta]} token" if @bastion_network + ui.info "Establishing connection to #{ui.color @bastion_host, :bold, :white}" + ui.warn "Please make sure to use your #{ui.color @bastion_network, :bold, :magenta} token" if @bastion_network start_proxy end