lib/upstart-exporter/options/validator.rb in upstart-exporter-2.1.4 vs lib/upstart-exporter/options/validator.rb in upstart-exporter-2.1.5

- old
+ new

@@ -55,11 +55,18 @@ :start_on_runlevel => validate_runlevel(cmd[:start_on_runlevel]), :stop_on_runlevel => validate_runlevel(cmd[:stop_on_runlevel]), :working_directory => validate_path(cmd[:working_directory]), :respawn => validate_respawn(cmd[:respawn]), :count => validate_digits(cmd[:count]), - :kill_timeout => validate_digits(cmd[:kill_timeout]) + :kill_timeout => validate_digits(cmd[:kill_timeout]), + :env => validate_env(cmd[:env]) } + end + + def validate_env(params) + return unless params + params.each_key {|k| reject_special_symbols(k)} + params end def validate_respawn(options) return options unless options.is_a?(Hash) \ No newline at end of file