From 6bf3f4888a71479e633a240eebdd48bf2f8eeb84 Mon Sep 17 00:00:00 2001 From: Donal McBreen Date: Tue, 18 Jun 2024 08:20:27 +0100 Subject: [PATCH] Allow aliases still --- lib/kamal/configuration.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/kamal/configuration.rb b/lib/kamal/configuration.rb index 33eedda1..5f1743bd 100644 --- a/lib/kamal/configuration.rb +++ b/lib/kamal/configuration.rb @@ -29,7 +29,9 @@ class Kamal::Configuration def load_config_file(file) if file.exist? - YAML.load(ERB.new(IO.read(file)).result).symbolize_keys + # 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 else raise "Configuration file not found in #{file}" end