diff should use project.license_file

This commit is contained in:
Ben Balter 2018-12-18 16:49:04 -05:00
parent 14683dac09
commit d81cc32734
No known key found for this signature in database
GPG Key ID: DBB67C246AD356C4
1 changed files with 1 additions and 6 deletions

View File

@ -39,14 +39,9 @@ class LicenseeCLI < Thor
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