Skip to content

Commit

Permalink
fix knife cannot ls a path problem. (double quotes is the issue)
Browse files Browse the repository at this point in the history
  • Loading branch information
Luxing Huang committed Sep 20, 2017
1 parent 6a2895b commit 59f97c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/_knife
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 59f97c3

Please sign in to comment.