Method: Jets::CLI#set_jets_env_from_cli_arg!
- Defined in:
- lib/jets/cli.rb
#set_jets_env_from_cli_arg! ⇒ Object
Adjust JETS_ENV before boot_jets is called for the jets deploy command. Must do this early in the process before Jets.boot because Jets.boot calls Jets.env as part of the bootup process in require_bundle_gems and sets the Jets.env to whatever the JETS_ENV is at the time.
Defaults to development when not set.
59 60 61 62 63 64 65 |
# File 'lib/jets/cli.rb', line 59 def set_jets_env_from_cli_arg! command, env = thor_args[0..1] return unless %w[deploy delete].include?(command) env = nil if env&.starts_with?('-') return unless env ENV['JETS_ENV'] = env ? env : 'development' end |