Sha256: 9273cf987b07044529c4f6415ca1495bbb58f97d91d7410358c00ac645fcaa79

Contents?: true

Size: 522 Bytes

Versions: 2

Compression:

Stored size: 522 Bytes

Contents

# frozen_string_literal: true

module Command
  class Exists < Base
    NAME = "exists"
    OPTIONS = [
      app_option(required: true)
    ].freeze
    DESCRIPTION = "Shell-checks if an application (GVC) exists, useful in scripts"
    LONG_DESCRIPTION = <<~HEREDOC
      - Shell-checks if an application (GVC) exists, useful in scripts, e.g.:
    HEREDOC
    EXAMPLES = <<~HEREDOC
      ```sh
      if [ cpl exists -a $APP_NAME ]; ...
      ```
    HEREDOC

    def call
      exit(!cp.fetch_gvc.nil?)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cpl-0.4.1 lib/command/exists.rb
cpl-0.4.0 lib/command/exists.rb