Sha256: fa71fe189fc52876894ee359d66999083c447b9842c87a4947bbd5919306a372
Contents?: true
Size: 657 Bytes
Versions: 11
Compression:
Stored size: 657 Bytes
Contents
# frozen_string_literal: true module Bolt class Plugin class EnvVar def initialize(*_args); end def name 'env_var' end def hooks %i[resolve_reference validate_resolve_reference] end def validate_resolve_reference(opts) unless opts['var'] raise Bolt::ValidationError, "env_var plugin requires that the 'var' is specified" end unless ENV[opts['var']] raise Bolt::ValidationError, "env_var plugin requires that the var '#{opts['var']}' be set" end end def resolve_reference(opts) ENV[opts['var']] end end end end
Version data entries
11 entries across 11 versions & 1 rubygems