diff --git a/src/onecfg/lib/config/type/yaml.rb b/src/onecfg/lib/config/type/yaml.rb index a295f9d5fa..5b3fdf9259 100644 --- a/src/onecfg/lib/config/type/yaml.rb +++ b/src/onecfg/lib/config/type/yaml.rb @@ -41,7 +41,11 @@ module OneCfg::Config::Type def load(name = @name) reset - @content = YAML.load_file(name) + if Gem::Version.new(Psych.const_get(:VERSION)) >= Gem::Version.new('4.0') + @content = YAML.load_file(name, aliases: true) + else + @content = YAML.load_file(name) + end @content end