No need for IO.read for basic file paths

References 3cad095, e1d5182
This commit is contained in:
Jeremy Daer
2024-12-10 16:08:56 -08:00
parent 407c8b834e
commit 16fb3adacb
2 changed files with 2 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ class Kamal::Configuration
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

View File

@@ -142,7 +142,7 @@ class Kamal::Configuration::Accessory
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)