Sha256: 507b88ae6b822d479a3f44dd1513c5c206bd75e32923a0782562ac320da4bbff

Contents?: true

Size: 506 Bytes

Versions: 16

Compression:

Stored size: 506 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 = <<~DESC
      - Shell-checks if an application (GVC) exists, useful in scripts, e.g.:
    DESC
    EXAMPLES = <<~EX
      ```sh
      if [ cpl exists -a $APP_NAME ]; ...
      ```
    EX

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

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
cpl-1.4.0 lib/command/exists.rb
cpl-1.3.0 lib/command/exists.rb
cpl-1.2.0 lib/command/exists.rb
cpl-1.1.2 lib/command/exists.rb
cpl-1.1.2.rc.0 lib/command/exists.rb
cpl-1.1.1 lib/command/exists.rb
cpl-1.1.0 lib/command/exists.rb
cpl-1.0.4 lib/command/exists.rb
cpl-1.0.3 lib/command/exists.rb
cpl-1.0.2 lib/command/exists.rb
cpl-1.0.1 lib/command/exists.rb
cpl-1.0.0 lib/command/exists.rb
cpl-0.7.0 lib/command/exists.rb
cpl-0.6.0 lib/command/exists.rb
cpl-0.5.1 lib/command/exists.rb
cpl-0.5.0 lib/command/exists.rb