From 59f97c36c913eb0803d5f46ce5e213f82d0764d0 Mon Sep 17 00:00:00 2001 From: Luxing Huang Date: Wed, 20 Sep 2017 16:39:46 -0400 Subject: [PATCH] fix knife cannot ls a path problem. (double quotes is the issue) --- src/_knife | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_knife b/src/_knife index 2c61d4f..53aa9ac 100644 --- a/src/_knife +++ b/src/_knife @@ -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