Skip to content

Commit

Permalink
stelligent/cfn_nag#416 Changing file read encoding to UTF-8 in cfn_pa…
Browse files Browse the repository at this point in the history
…rse, and removing UTF-8 characters from template key names.
  • Loading branch information
Patrick Shelby committed Mar 25, 2020
1 parent 1b5af68 commit 937035a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/cfn_parse
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ require 'cfn-model'
puts '======'
puts ARGV[0]
puts '======'
cfn_model = CfnParser.new.parse IO.read(ARGV[0]), nil, true
cfn_model = CfnParser.new.parse IO.read(ARGV[0], encoding: Encoding::UTF_8), nil, true
puts cfn_model
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"Service": [ "ec2.amazonaws.com" ],
"AWS" : "arn:aws:iam::324320755747:root"
},
"Actioñ": ["sts:AssumeRole"]
"Action": ["sts:AssumeRole"]
}
},
"Path": "/",
Expand Down
2 changes: 1 addition & 1 deletion spec/test_templates/yaml/template_with_utf8_characters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Resources:
Service:
- ec2.amazonaws.com
AWS: arn:aws:iam::324320755747:root
Actioñ:
Action:
- sts:AssumeRole
Path: /
Policies:
Expand Down

0 comments on commit 937035a

Please sign in to comment.