class Caco::Debian::UserHome

Public Instance Methods

find_user_home(ctx, user:, passwd_output:, **) click to toggle source
# File lib/caco/debian/user_home.rb, line 10
def find_user_home(ctx, user:, passwd_output:, **)
  match = passwd_output.match(/^#{user}:[^:]*:[^:]*:[^:]*:[^:]*:([^:]*):.*$/)
  return false unless match

  ctx[:user_home] = match[1]
end