Skip to content

Commit

Permalink
diff should use project.license_file
Browse files Browse the repository at this point in the history
  • Loading branch information
benbalter committed Dec 18, 2018
1 parent 14683da commit d81cc32
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/licensee/commands/diff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,9 @@ def diff(_path = nil)

def license_to_diff
return options[:license_to_diff] if options[:license_to_diff]
return project.license_file if remote?
return project.license_file if remote? || STDIN.tty? && project.license_file

@license_to_diff ||= begin
if STDIN.tty?
error 'You must pipe license contents to the command via STDIN'
exit 1
end

Licensee::ProjectFiles::LicenseFile.new(STDIN.read, 'LICENSE')
end
end
Expand Down

0 comments on commit d81cc32

Please sign in to comment.