Details
-
Type:
Bug
-
Status:
Confirmed
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 0.10.6
-
Fix Version/s: 11.14.0-client
-
Component/s: Chef Client
-
Labels:None
-
Environment:
Windows 2003, could effect Windows 2008 and 7 if they move their cookbook path from defaults
Description
This was not a bug in 10.4. In Windows 2003, due to the spaces in the cookbook path in the knife.rb it is read incorrectly if using double quotes. The cookbook path we tell people to use is ["#{ENV['HOME']}/chef-repo/cookbooks"] which does not work and gives this error:
C:\Documents and Settings\Administrator\chef-repo>knife cookbook upload getting-started
Uploading getting-started [0.3.0]
FATAL: Cookbook file attributes/default.rb has a ruby syntax error:
FATAL: ruby: No such file or directory -- C:/Documents (LoadError)
Using these paths also did not work:
cookbook_path "\"#{ENV['HOME']}/chef-repo/cookbooks\""
cookbook_path File.join(ENV['HOME'], 'chef-repo/cookbooks')
This also didn't work:
current_dir = File.dirname(__FILE__)
cookbook_path ["#{current_dir}/../cookbooks"]
The only paths that worked were:
cookbook_path ['C:\Documents and Settings\Administrator\chef-repo\cookbooks']
cookbook_path "#{ENV['HOME']}/chef-repo/cookbooks".gsub(::File::SEPARATOR, ::File::ALT_SEPARATOR)
This issue does not seem to effect the client.rb, Windows 2003 is able to read the client_key "#{ENV['HOME']}/chef-repo/client.pem" line in it without issues.
Issue Links
- is duplicated by
-
CHEF-4412 knife cookbook upload can't handle cookbook_path with spaces in the name
-
This could be related to this bug, which was closed as wont fix:
CHEF-2725