Sha256: 3f882d16eea92cd9bcbdbff65159882972f071a99cba6f6b3cca8665bcb4acaa

Contents?: true

Size: 382 Bytes

Versions: 4

Compression:

Stored size: 382 Bytes

Contents

# frozen_string_literal: true

class LicenseeCLI < Thor
  desc 'license-path [PATH]', "Returns the path to the given project's license file"
  def license_path(path)
    project = Licensee.project(path)

    exit 1 unless project.license_file

    if remote?
      say project.license_file.path
    else
      say File.expand_path(project.license_file.path, path)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
licensee-9.18.0 lib/licensee/commands/license_path.rb
licensee-9.17.1 lib/licensee/commands/license_path.rb
licensee-9.17.0 lib/licensee/commands/license_path.rb
licensee-9.16.1 lib/licensee/commands/license_path.rb