lib/jets/cli.rb in jets-1.3.5 vs lib/jets/cli.rb in jets-1.3.6

- old
+ new

@@ -42,11 +42,11 @@ # are available and displayed. # def boot_jets command = thor_args.first if !%w[new help].include?(command) - set_jets_env_for_deploy_command! + set_jets_env_from_cli_arg! Jets.boot end end # Adjust JETS_ENV before boot_jets is called for the jets deploy @@ -54,12 +54,12 @@ # 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. - def set_jets_env_for_deploy_command! + def set_jets_env_from_cli_arg! command, env = thor_args[0..1] - return unless command == "deploy" + return unless %w[deploy delete].include?(command) env = nil if env&.starts_with?('-') ENV['JETS_ENV'] = env ? env : 'development' end # thor_args normalized the args Array to work with our Thor command