Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ui.color() calls to work with latest chef client #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/chef/knife/bastion_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/chef/knife/bastion_start.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down