Skip to content

Commit

Permalink
use env
Browse files Browse the repository at this point in the history
  • Loading branch information
jpogran committed Jan 4, 2021
1 parent b6cf91d commit 8634499
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions exe/bolt
@@ -1,17 +1,20 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

require 'bootsnap'
cache = File.join(ENV['USERPROFILE'], '.puppetlabs', 'bolt')
Bootsnap.setup(
cache_dir: cache, # Path to your cache
development_mode: false, # Current working environment, e.g. RACK_ENV, RAILS_ENV, etc
load_path_cache: true, # Optimize the LOAD_PATH with a cache
autoload_paths_cache: false, # Optimize ActiveSupport autoloads with cache
disable_trace: false, # Set `RubyVM::InstructionSequence.compile_option = { trace_instruction: false }`
compile_cache_iseq: true, # Compile Ruby code into ISeq cache, breaks coverage reporting.
compile_cache_yaml: true # Compile YAML into a cache
)
bootsnap_enabled = ENV['BOLT_BOOTSNAP'] || false
if bootsnap_enabled
require 'bootsnap'
cache = File.join(ENV['USERPROFILE'], '.puppetlabs', 'etc', 'bolt')
Bootsnap.setup(
cache_dir: cache, # Path to your cache
development_mode: false, # Current working environment, e.g. RACK_ENV, RAILS_ENV, etc
load_path_cache: true, # Optimize the LOAD_PATH with a cache
autoload_paths_cache: false, # Optimize ActiveSupport autoloads with cache
disable_trace: false, # Set `RubyVM::InstructionSequence.compile_option = { trace_instruction: false }`
compile_cache_iseq: true, # Compile Ruby code into ISeq cache, breaks coverage reporting.
compile_cache_yaml: true # Compile YAML into a cache
)
end

require 'bolt'
require 'bolt/cli'
Expand Down

0 comments on commit 8634499

Please sign in to comment.