Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #3 from pRdm/master
Browse files Browse the repository at this point in the history
fix: YAML.load being run on incorrect string
  • Loading branch information
cheah authored Oct 10, 2018
2 parents e68e7f6 + 824da92 commit 334a135
Showing 1 changed file with 1 addition and 2 deletions.
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

0 comments on commit 334a135

Please sign in to comment.