Skip to content

Commit

Permalink
Do not break when logging the config
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamMcCumstie committed May 7, 2020
1 parent f403df4 commit b40d7d2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions lib/flight_asset/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,12 @@ def logger
end
end

Config::CACHE.logger.info "Loaded Config: #{CONFIG_PATH}"
data = File.read(CONFIG_PATH).gsub(/(?<=jwt)\s*:[^\n]*/, ': REDACTED')
Config::CACHE.logger.debug data
if File.exists? CONFIG_PATH
Config::CACHE.logger.info "Loaded Config: #{CONFIG_PATH}"
data = File.read(CONFIG_PATH).gsub(/(?<=jwt)\s*:[^\n]*/, ': REDACTED')
Config::CACHE.logger.debug data
else
Config::CACHE.logger.info "Missing Config: #{CONFIG_PATH}"
end
end

2 changes: 1 addition & 1 deletion lib/flight_asset/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
#==============================================================================

module FlightAsset
VERSION = '0.3.1'
VERSION = '0.3.2'
end

0 comments on commit b40d7d2

Please sign in to comment.