Skip to content

Commit

Permalink
Merge pull request #110 from coinbase/allow-filename-as-arg
Browse files Browse the repository at this point in the history
Fix handling of Windows newlines
  • Loading branch information
sds authored Feb 14, 2020
2 parents d6a866d + efa5cbb commit 752deb4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/terraform_landscape/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def define_commands

def print(options)
printer = Printer.new(@output)
printer.process_stream(STDIN, options)
printer.process_stream(ARGF, options)
end
end
end
3 changes: 3 additions & 0 deletions lib/terraform_landscape/printer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ def process_stream(io, options = {}) # rubocop:disable Metrics/MethodLength
def process_string(plan_output) # rubocop:disable Metrics/MethodLength
scrubbed_output = strip_ansi(plan_output)

# Our grammar assumes output with Unix line endings
scrubbed_output.gsub!("\r\n", "\n")

# Remove initialization messages like
# "- Downloading plugin for provider "aws" (1.1.0)..."
# "- module.base_network"
Expand Down

0 comments on commit 752deb4

Please sign in to comment.