Unverified Commit 2d171d9a authored by Joost van der Hoff's avatar Joost van der Hoff
Browse files

Accept Chef license on first use in AppVeyor pipeline

Otherwise the pipeline fails on this command with the following error
message:

> Chef Development Kit cannot execute without accepting the license

It seems the command-line option to accept the licens can't be placed
such that it isn't erroneously interpreted as a subcommand (whether
before or after the exec subcommand), so I went with the environment
variable instead, which does seem to work correctly.
parent 85cf51f9
......@@ -18,6 +18,7 @@ install:
- ps: iex (irm https://omnitruck.chef.io/install.ps1); Install-Project -Project chefdk -channel current
- ps: 'Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version'
- ps: $PSVersionTable
- ps: '$env:CHEF_LICENSE = "accept"'
- c:\opscode\chefdk\bin\chef.bat exec ruby --version
- ps: secedit /export /cfg $env:temp/export.cfg
- ps: ((get-content $env:temp/export.cfg) -replace ('PasswordComplexity = 1', 'PasswordComplexity = 0')) | Out-File $env:temp/export.cfg
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment