Skip to content

Commit 7af3da1

Browse files
committed
fix: YAML.load being run on incorrect string
forward3d#81
1 parent 8d394eb commit 7af3da1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/cap-ec2/utils.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
module CapEC2
44
module Utils
5-
65
module Server
76
def ec2_tags
87
id = self.properties.fetch(:aws_instance_id)
@@ -56,7 +55,7 @@ def load_config
5655

5756
config_location = File.expand_path(fetch(:ec2_config), Dir.pwd) if fetch(:ec2_config)
5857
if config_location && File.exists?(config_location)
59-
config = YAML.load(ERB.new(File.read(fetch(:ec2_config))))
58+
config = YAML.load(ERB.new(File.read(fetch(:ec2_config))).result)
6059
if config
6160
set :ec2_project_tag, config['project_tag'] if config['project_tag']
6261
set :ec2_roles_tag, config['roles_tag'] if config['roles_tag']

0 commit comments

Comments
 (0)