Skip to content

Commit b055e48

Browse files
committed
Fix syntax error in install command
1 parent 94662d0 commit b055e48

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/chef-server-ctl/plugins/install.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,19 @@
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

0 commit comments

Comments
 (0)