Search code examples
chef-infrachef-recipechef-solo

ChefDK : chef shell-init SHELL_NAME command


Maybe I'm going crazy, but in the README for ChefDK is says

(https://github.com/opscode/chef-dk#chef-shell-init)

chef shell-init

chef shell-init SHELL_NAME emits shell commands that modify your environment to make ChefDK your primary ruby. For more information to help you decide if this is desirable and instructions, see "Using ChefDK as Your Primary Development Environment" below.

So I tried:

eval "$(chef shell-init zsh)"

and

eval "$(chef shell-init bash)"

All I get is.

Unknown command `shell-init'.

The help returns the following:

Available Commands:

verify    Test the embedded ChefDK applications
gem       Runs the `gem` command in context of the embedded ruby
generate  Generate a new app, cookbook, or component

So is the README out of data, or am I doing something wrong?

Thanks


Solution

  • Did you build chef-dk yourself or install it from a downloaded package?

    The CHANGELOG.md shows that shell-init has just been introduced in version 0.2.0, which is not available on the download page yet.

    You can check what version you have with chef -v