We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0aadd1d commit a098587Copy full SHA for a098587
app/bin/companies.rb
@@ -15,8 +15,16 @@
15
UPDATE_ALL=2
16
17
name_variants = Hash.new(0)
18
-$companies_info = YAML::load_file('../data/company_infos.yml') || Hash.new(0)
19
-company_mapping = YAML::load_file('../data/company_mapping.yml') || Hash.new(0)
+if File.exists? ('../data/company_infos.yml')
+ $companies_info = YAML::load_file('../data/company_infos.yml')
20
+else
21
+ $companies_info = Hash.new(0)
22
+end
23
+if File.exists? ('../data/company_mapping.yml')
24
+ company_mapping = YAML::load_file('../data/company_mapping.yml') || Hash.new(0)
25
26
+ company_mapping = Hash.new(0)
27
28
update=UPDATE_NONE
29
if ARGV.length == 1
30
if ARGV[0] == '--update-all'
0 commit comments