Sha256: ac079c86b623528e4ef7f4ae8404add83c0670b6386efca2c4be928835b3d591

Contents?: true

Size: 394 Bytes

Versions: 8

Compression:

Stored size: 394 Bytes

Contents

module Terraspace::Terraform::Ihooks::Before
  class Plan < Terraspace::Terraform::Ihooks::Base
    def run
      return unless out_option
      return if out_option =~ %r{^/} # not need to create parent dir for copy with absolute path

      name = out_option.sub("#{Terraspace.root}/",'')
      dest = "#{@mod.cache_dir}/#{name}"
      FileUtils.mkdir_p(File.dirname(dest))
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
terraspace-1.1.7 lib/terraspace/terraform/ihooks/before/plan.rb
terraspace-1.1.6 lib/terraspace/terraform/ihooks/before/plan.rb
terraspace-1.1.5 lib/terraspace/terraform/ihooks/before/plan.rb
terraspace-1.1.4 lib/terraspace/terraform/ihooks/before/plan.rb
terraspace-1.1.3 lib/terraspace/terraform/ihooks/before/plan.rb
terraspace-1.1.2 lib/terraspace/terraform/ihooks/before/plan.rb
terraspace-1.1.1 lib/terraspace/terraform/ihooks/before/plan.rb
terraspace-1.1.0 lib/terraspace/terraform/ihooks/before/plan.rb