- From: "David A. Williams" <
>
- To: "
" <
>
- Subject: [chef] Code works with hosted chef but fails on Chef Zero
- Date: Tue, 29 Apr 2014 08:42:48 -0500
- Accept-language: en-US
- Acceptlanguage: en-US
Hi Everyone,
I've been messing around with test kitchen on windows using the
windows_chef_zero gem. I'm not sure why the following piece of the recipe
fails on chef zero but not hosted chef. It says that it can't convert nil
into String but I can't see where. Can you help me out?
Thanks,
David
================================================================================
Error executing action `run` on resource 'batch[Install Microsoft
KB2842230]'
================================================================================
TypeError
---------
can't convert nil into String
Resource Declaration:
---------------------
# In
C:/Windows/Temp/kitchen/cache/cookbooks/operations/recipes/bootstrap.rb
63: batch "Install Microsoft #{kb.chomp('-v2')}" do
64: code <<-EOH
65
: dism /Online /add-package
/PackagePath:"#{Chef::Config[:file_cache_path]}\\#{kb.chomp('-v2')}\\Windows8-RT-#{kb}-x64.cab"
/NoRestart /quiet
66: IF %ERRORLEVEL% EQU 3010 SET ERRORLEVEL=0
67: EOH
68: notifies :request, "windows
_reboot[60]"
69: end
70: end
Compiled Resource:
------------------
# Declared in
C:/Windows/Temp/kitchen/cache/cookbooks/operations/recipes/bootstrap.rb:63:in
`block in from_file'
batch("Install Microsoft KB2842230") do
action "run"
retries 0
retry_delay 2
guard_interpreter :default
command "Install Microsoft KB2842230"
backup 5
returns 0
code " dism /Online /add-package
/PackagePath:\"C:\\Windows\\Temp\\kitchen\\cache\\KB2842230\\Windows8-RT-KB2842230-x64.cab\"
/NoRestart /quiet\n IF %ERRORLEVEL% EQU 3010 SET ERRORLEVEL=0\n"
interpreter "cmd.exe"
cookbook_name "operations"
recipe_name "bootstrap"
end
________________________________
CONFIDENTIALITY NOTICE: This electronic mail may contain information that is
privileged, confidential, and/or otherwise protected from disclosure to
anyone other than its intended recipient(s). Any dissemination or use of this
electronic mail or its contents by persons other than the intended
recipient(s) is strictly prohibited. If you have received this communication
in error, please notify the sender immediately by reply e-mail so that we may
correct our internal records. Please then delete the original message. Thank
you.
- [chef] Code works with hosted chef but fails on Chef Zero, David A. Williams, 04/29/2014
Archive powered by MHonArc 2.6.16.