provisioners/chef: fix crash if run list is somehow nil [GH-5545]
This commit is contained in:
parent
262b50bc02
commit
e64cef9d31
|
@ -132,7 +132,8 @@ module VagrantPlugins
|
||||||
|
|
||||||
# Get the JSON that we're going to expose to Chef
|
# Get the JSON that we're going to expose to Chef
|
||||||
json = @config.json
|
json = @config.json
|
||||||
json[:run_list] = @config.run_list if !@config.run_list.empty?
|
json[:run_list] = @config.run_list if @config.run_list &&
|
||||||
|
!@config.run_list.empty?
|
||||||
json = JSON.pretty_generate(json)
|
json = JSON.pretty_generate(json)
|
||||||
|
|
||||||
# Create a temporary file to store the data so we
|
# Create a temporary file to store the data so we
|
||||||
|
|
Loading…
Reference in New Issue