When I run a chef-run, I see the error as:
[Rel92-Test-agt1] At C:\chef\install.ps1:56 char:13
+ if ($pA256($src) {
+ ~
Unexpected token '(' in expression or statement.
At C:\chef\install.ps1:56 char:13
+ if ($pA256($src) {
+ ~
Missing closing ')' after expression in 'if' statement.
At C:\chef\install.ps1:56 char:20
+ if ($pA256($src) {
+ ~
Unexpected token '{' in expression or statement.
At C:\chef\install.ps1:51 char:29
+ Function Install-Chef($msi) {
+ ~
Missing closing '}' in statement block.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : UnexpectedToken
I Check the script locally on the node adn the syntax is in fact bad, I deleted it and ran it again, and the same script is downloaded. This script is generated via the Chef-Provisioning cookbook:
but I’m not sure this is because of that cookbook or the generator for the scrpt that is run on line 39
install_command = Mixlib::Install::ScriptGenerator.new(chef_version, true, opts).install_command