diff options
author | sanga17 <sausekar@msystechnologies.com> | 2021-05-10 18:51:26 +0530 |
---|---|---|
committer | sanga17 <sausekar@msystechnologies.com> | 2021-07-02 19:38:09 +0530 |
commit | 658d85bee57829a2957eccdc919db397e867c5d2 (patch) | |
tree | 44f048646de276963be331fdd508f86a1832f6df | |
parent | 6c2642d198e578cf8196b03ab26546ca7eff5c42 (diff) | |
download | chef-658d85bee57829a2957eccdc919db397e867c5d2.tar.gz |
Fetched user from ssh file if user not added in cli
Signed-off-by: sanga17 <sausekar@msystechnologies.com>
-rw-r--r-- | knife/lib/chef/knife/bootstrap/train_connector.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/knife/lib/chef/knife/bootstrap/train_connector.rb b/knife/lib/chef/knife/bootstrap/train_connector.rb index ecc7a80302..d369cf3dcc 100644 --- a/knife/lib/chef/knife/bootstrap/train_connector.rb +++ b/knife/lib/chef/knife/bootstrap/train_connector.rb @@ -130,7 +130,7 @@ class Chef if config[:sudo] # While using ssh config file user might present in ssh file user = config[:user] || ssh_config_for_host(config[:host])[:user] - run_command!("chown #{config[:user]} '#{dir}'") + run_command!("chown #{user} '#{dir}'") end dir end |