fix knife cannot ls a path problem. (double quotes is the issue)

This commit is contained in:
Luxing Huang 2017-09-20 16:39:46 -04:00
parent 6a2895b7f5
commit 59f97c36c9
1 changed files with 1 additions and 1 deletions

View File

@ -219,7 +219,7 @@ _chef_users_remote() {
# The chef_x_local functions use the knife config to find the paths of relevant objects x to be uploaded to the server
_chef_cookbooks_local() {
(for i in $( grep cookbook_path $HOME/.chef/knife.rb | awk 'BEGIN {FS = "[" }; {print $2}' | sed 's/\,//g' | sed "s/'//g" | sed 's/\(.*\)]/\1/' ); do ls $i; done)
(for i in $( grep cookbook_path $HOME/.chef/knife.rb | awk 'BEGIN {FS = "[" }; {print $2}' | sed 's/\,//g' | sed "s/'//g" | sed 's/\(.*\)]/\1/' | cut -d '"' -f2 ); do ls $i; done)
}
# This function extracts the available cookbook versions on the chef server