File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
src/chef-server-ctl/plugins Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 4545
4646 if package . nil?
4747 STDERR . puts "You must supply an addon name. Valid names include: #{ KNOWN_ADDONS . join ( ", " ) } ."
48- "private_chef" => { "addons" => {
49- "install" => true ,
50- "packages" => [ package ] ,
51- "path" => install_path ,
52- "license_id" => license_id ,
53- } } }
54- File . open ( attributes_path , "w" ) do |file |
48+ exit 1
49+ elsif !KNOWN_ADDONS . include? ( package )
50+ STDERR . puts "#{ package } does not appear to be a valid addon name. Valid names include: #{ KNOWN_ADDONS . join ( ", " ) } ."
51+ exit 1
52+ end
53+
5554 attributes_path = "#{ base_path } /embedded/cookbooks/install_params.json"
5655 json_src = { "run_list" => [ "recipe[infra-server::add_ons_wrapper]" ] ,
5756 "private_chef" => { "addons" => {
5857 "install" => true ,
5958 "packages" => [ package ] ,
6059 "path" => install_path ,
60+ "license_id" => license_id ,
6161 } } }
6262 File . open ( attributes_path , "w" ) do |file |
6363 file . write json_src . to_json
You can’t perform that action at this time.
0 commit comments