We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d7c05b commit a67b52fCopy full SHA for a67b52f
lib/bashly.rb
@@ -7,6 +7,7 @@
7
8
requires 'bashly/concerns'
9
10
+requires 'bashly/extensions'
11
requires 'bashly/settings'
12
requires 'bashly/exceptions'
13
requires 'bashly/refinements'
lib/bashly/config.rb
@@ -10,7 +10,7 @@ class Config
def self.new(config)
if config.is_a? String
- YAML.load_file(config).compose
+ YAML.properly_load_file(config).compose
14
else
15
config
16
end
lib/bashly/extensions/yaml.rb
@@ -0,0 +1,8 @@
1
+module YAML
2
+ # This awkward patch is due to https://bugs.ruby-lang.org/issues/17866
3
+ def self.properly_load_file(path)
4
+ YAML.load_file path, aliases: true
5
+ rescue ArgumentError
6
+ YAML.load_file path
+ end
+end
0 commit comments