Skip to content

Commit

Permalink
Fix bug in configuration file processing. Remove invalid
Browse files Browse the repository at this point in the history
configuration options (if they exist) from rocotorc to
prevent continuous updates to the file.
  • Loading branch information
christopherwharrop-noaa committed Jul 8, 2016
1 parent a173bea commit df994c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/workflowmgr/workflowconfig.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ def initialize
if config.is_a?(Hash)
# Merge default config into rocotorc config if there are unspecified config options
if config.keys.collect {|c| c.to_s}.sort != DEFAULT_CONFIG.keys.collect {|c| c.to_s}.sort
config=DEFAULT_CONFIG.merge(config)
config=DEFAULT_CONFIG.merge(config).delete_if { |k,v| !DEFAULT_CONFIG.has_key?(k) }

File.open(@config_file,"w") { |f| YAML.dump(config,f) }
end
config
Expand Down

0 comments on commit df994c9

Please sign in to comment.