Skip to content
This repository has been archived by the owner on Jun 28, 2019. It is now read-only.

fix: YAML.load being run on incorrect string #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/cap-ec2/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

module CapEC2
module Utils

module Server
def ec2_tags
id = self.properties.fetch(:aws_instance_id)
Expand Down Expand Up @@ -56,7 +55,7 @@ def load_config

config_location = File.expand_path(fetch(:ec2_config), Dir.pwd) if fetch(:ec2_config)
if config_location && File.exists?(config_location)
config = YAML.load(ERB.new(File.read(fetch(:ec2_config))))
config = YAML.load(ERB.new(File.read(fetch(:ec2_config))).result)
if config
set :ec2_project_tag, config['project_tag'] if config['project_tag']
set :ec2_roles_tag, config['roles_tag'] if config['roles_tag']
Expand Down