# File src/ruby_supportlib/phusion_passenger/platform_info/ruby.rb, line 350
    def self.ruby_sudo_shell_command(args = nil)
      if in_rvm?
        shell = ENV['SHELL'].to_s
        if shell.empty?
          begin
            user = Etc.getpwuid(0)
          rescue ArgumentError
            user = nil
          end
          shell = user.shell if user
          shell = "bash" if !shell || shell.empty?
        end
        result = "rvmsudo "
        result << "#{args} " if args
        result << shell
        return result
      else
        return "sudo -s #{args}".strip
      end
    end