Skip to content

Commit

Permalink
No need for IO.read for basic file paths
Browse files Browse the repository at this point in the history
References 3cad095, e1d5182
  • Loading branch information
jeremy committed Dec 11, 2024
1 parent 407c8b8 commit 16fb3ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/kamal/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def load_config_file(file)
if file.exist?
# Newer Psych doesn't load aliases by default
load_method = YAML.respond_to?(:unsafe_load) ? :unsafe_load : :load
YAML.send(load_method, ERB.new(IO.read(file)).result).symbolize_keys
YAML.send(load_method, ERB.new(File.read(file)).result).symbolize_keys
else
raise "Configuration file not found in #{file}"
end
Expand Down
2 changes: 1 addition & 1 deletion lib/kamal/configuration/accessory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def with_clear_env_loaded
end

def read_dynamic_file(local_file)
StringIO.new(ERB.new(IO.read(local_file)).result)
StringIO.new(ERB.new(File.read(local_file)).result)
end

def expand_remote_file(remote_file)
Expand Down

0 comments on commit 16fb3ad

Please sign in to comment.