aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dbshell/exec_alias.rb
blob: 7bd86b7d9c7b224ddb9a6731a01967046c52a9ee (plain)
1
2
3
4
5
6
7
8
9
10
11
module DBShell
  class ExecAlias
    def self.exec(command_args)
      Kernel.exec(*self.build_command(command_args))
    end

    def self.build_command(command_args)
      [ENV['SHELL'], '--login', '-c', command_args.join(' ')]
    end
  end
end