{"action":"created","issue":{"url":"https://api.github.com/repos/chef/chef-dk/issues/480","labels_url":"https://api.github.com/repos/chef/chef-dk/issues/480/labels{/name}","comments_url":"https://api.github.com/repos/chef/chef-dk/issues/480/comments","events_url":"https://api.github.com/repos/chef/chef-dk/issues/480/events","html_url":"https://github.com/chef/chef-dk/issues/480","id":102892893,"number":480,"title":"chef -v throws an error if chef-client is installed (windows)","user":{"login":"vinyar","id":5116939,"avatar_url":"https://avatars.githubusercontent.com/u/5116939?v=3","gravatar_id":"","url":"https://api.github.com/users/vinyar","html_url":"https://github.com/vinyar","followers_url":"https://api.github.com/users/vinyar/followers","following_url":"https://api.github.com/users/vinyar/following{/other_user}","gists_url":"https://api.github.com/users/vinyar/gists{/gist_id}","starred_url":"https://api.github.com/users/vinyar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinyar/subscriptions","organizations_url":"https://api.github.com/users/vinyar/orgs","repos_url":"https://api.github.com/users/vinyar/repos","events_url":"https://api.github.com/users/vinyar/events{/privacy}","received_events_url":"https://api.github.com/users/vinyar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chef/chef-dk/labels/Windows","name":"Windows","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-24T21:13:38Z","updated_at":"2015-08-25T01:05:17Z","closed_at":null,"body":"Looks like $PATH variable is appended to the end of the string. Causing Chef-client to appear earlier, resulting in the below issue.\r\n\r\nBelow error leads me to believe that there will be other errors related to $PATH and potential gem conflicts.\r\n\r\nscenario:\r\nChefDK is installed on a machine with Chef-client already present. \r\n\r\n```\r\nC:\\> chef -v\r\nChef Development Kit Version: 0.7.0\r\nchef-client version: 11.16.4\r\nberks version: ERROR\r\nkitchen version: 1.4.2\r\n```\r\n\r\nPATH variable: \r\n```\r\n....\r\nC:\\ProgramData\\chocolatey\\bin\r\nC:\\Program Files (x86)\\Git\\cmd\r\nC:\\opscode\\chef\\bin\r\nC:\\opscode\\chef\\embedded\\bin\r\nC:\\HashiCorp\\Vagrant\\bin\r\nC:\\opscode\\chefdk\\bin\\\r\nC:\\Program Files (x86)\\Git\\bin\r\n```\r\n\r\nworkaround:\r\n```\r\nC:\\> chef exec chef -v\r\nChef Development Kit Version: 0.7.0\r\nchef-client version: 12.4.1\r\nberks version: 3.2.4\r\nkitchen version: 1.4.2\r\n```\r\nor the obvious one - uninstalling chef-client"},"comment":{"url":"https://api.github.com/repos/chef/chef-dk/issues/comments/134433887","html_url":"https://github.com/chef/chef-dk/issues/480#issuecomment-134433887","issue_url":"https://api.github.com/repos/chef/chef-dk/issues/480","id":134433887,"user":{"login":"vinyar","id":5116939,"avatar_url":"https://avatars.githubusercontent.com/u/5116939?v=3","gravatar_id":"","url":"https://api.github.com/users/vinyar","html_url":"https://github.com/vinyar","followers_url":"https://api.github.com/users/vinyar/followers","following_url":"https://api.github.com/users/vinyar/following{/other_user}","gists_url":"https://api.github.com/users/vinyar/gists{/gist_id}","starred_url":"https://api.github.com/users/vinyar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinyar/subscriptions","organizations_url":"https://api.github.com/users/vinyar/orgs","repos_url":"https://api.github.com/users/vinyar/repos","events_url":"https://api.github.com/users/vinyar/events{/privacy}","received_events_url":"https://api.github.com/users/vinyar/received_events","type":"User","site_admin":false},"created_at":"2015-08-25T01:05:17Z","updated_at":"2015-08-25T01:05:17Z","body":"I think the behavior should be same as on a mac. Installing DK will cause all chef commands to default to DK - it takes over all of the executables via simlinks or by placing itself first in the path, or completely removing chef-client from the path. presently it's getting intermingled with existing install of chef-client which will most likely lead to bad things.\r\n\r\nThe only use case I can think of, is where administrators manage workstations with chef-client 11 or generally not able to upgrade chef-client. While development is happening on the latest DK. (ive seen it). In that scenario upgrading chef-client can break existing infra.\r\n\r\n"}}