From 16fb3adacb70d600bfbe2136c76905960d978349 Mon Sep 17 00:00:00 2001 From: Jeremy Daer Date: Tue, 10 Dec 2024 16:08:56 -0800 Subject: [PATCH] No need for IO.read for basic file paths References 3cad095, e1d5182 --- lib/kamal/configuration.rb | 2 +- lib/kamal/configuration/accessory.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/kamal/configuration.rb b/lib/kamal/configuration.rb index 92d850e2c..52c807d7a 100644 --- a/lib/kamal/configuration.rb +++ b/lib/kamal/configuration.rb @@ -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 diff --git a/lib/kamal/configuration/accessory.rb b/lib/kamal/configuration/accessory.rb index 2728607d5..198e6321e 100644 --- a/lib/kamal/configuration/accessory.rb +++ b/lib/kamal/configuration/accessory.rb @@ -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)