mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-27 08:48:56 +01:00
Merge pull request #1233 from mugenken/knife-check-cwd
check for knife.rb in cwd
This commit is contained in:
commit
ed5d2fff1f
@ -170,7 +170,11 @@ _chef_environments_remote() {
|
|||||||
|
|
||||||
# The chef_x_local functions use the knife config to find the paths of relevant objects x to be uploaded to the server
|
# 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() {
|
_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)
|
local knife_rb="$HOME/.chef/knife.rb"
|
||||||
|
if [ -f ./.chef/knife.rb ]; then
|
||||||
|
knife_rb="./.chef/knife.rb"
|
||||||
|
fi
|
||||||
|
(for i in $( grep cookbook_path $knife_rb | awk 'BEGIN {FS = "[" }; {print $2}' | sed 's/\,//g' | sed "s/'//g" | sed 's/\(.*\)]/\1/' ); do ls $i; done)
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function extracts the available cookbook versions on the chef server
|
# This function extracts the available cookbook versions on the chef server
|
||||||
|
Loading…
Reference in New Issue
Block a user