summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authordheerajd-msys <dheeraj.dubey@msystechnologies.com>2019-01-28 18:21:28 +0530
committerTim Smith <tsmith@chef.io>2019-01-29 11:33:22 -0800
commitf310bc6f7a891865f5c0af0509384e93c3bbf41b (patch)
tree6ac7db7bf48b0b8cf66221f1ce5e2dc2820c2cfd /lib
parenta16ebbb01d3b591577813d3415c3a99216166e38 (diff)
downloadchef-f310bc6f7a891865f5c0af0509384e93c3bbf41b.tar.gz
Fix for sensitive url
Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/provider/git.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/chef/provider/git.rb b/lib/chef/provider/git.rb
index 5845f869d8..f43e435464 100644
--- a/lib/chef/provider/git.rb
+++ b/lib/chef/provider/git.rb
@@ -151,7 +151,7 @@ class Chef
end
def clone
- converge_by("clone from #{new_resource.repository} into #{cwd}") do
+ converge_by("clone from #{repo_url} into #{cwd}") do
remote = new_resource.remote
clone_cmd = ["clone"]
@@ -161,7 +161,7 @@ class Chef
clone_cmd << "\"#{new_resource.repository}\""
clone_cmd << "\"#{cwd}\""
- logger.info "#{new_resource} cloning repo #{new_resource.repository} to #{cwd}"
+ logger.info "#{new_resource} cloning repo #{repo_url} to #{cwd}"
git clone_cmd
end
end
@@ -342,6 +342,12 @@ class Chef
string =~ /^[0-9a-f]{40}$/
end
+ def repo_url
+ if new_resource.sensitive
+ "**Supressed Sensitive URL**"
+ else
+ new_resource.repository
+ end
end
end
end