Skip to content

Commit

Permalink
Accept Chef license on first use in AppVeyor pipeline
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Joost van der Hoff committed Mar 3, 2020
1 parent 85cf51f commit 2d171d9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2d171d9

Please sign in to comment.