Class: Herve::CLI::ShellCommands::Env
- Inherits:
-
BaseCommand
- Object
- Dry::CLI::Command
- BaseCommand
- Herve::CLI::ShellCommands::Env
- Defined in:
- lib/herve/cli/shell_commands/env.rb
Instance Attribute Summary
Attributes inherited from BaseCommand
Instance Method Summary collapse
Methods inherited from BaseCommand
Instance Method Details
#call(shell:, **_args) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/herve/cli/shell_commands/env.rb', line 10 def call(shell:, **_args) ruby = config.project_ruby env = Config.env_for(ruby) unset = env.select { |_k, v| v.nil? }.keys set = env.compact case shell when "bash", "zsh" env_bash(unset, set) else raise Error, "unsupported shell '#{shell}'" end end |