libraries/helpers.rb
# Checks against the string returned by uid_user. Returns nil if uid_user is
# root or a system user (which start with an underscore).
Checks against the string returned by uid_user. Returns nil if uid_user is
root or a system user (which start with an underscore).
Checks against the string returned by uid_user . Returns nil if uid_user is root or a system user ( which start with an underscore ) .
def current_user
  if node['platform'] == 'mac_os_x'
    if uid_user == 'root'
      nil
    elsif /^_\w*\z/.match(uid_user)
      nil
    else
      uid_user
    end
  else 
    uid_user
  end
end
def current_user if node [ 'platform' ] == 'mac_os_x' if uid_user == 'root' nil elsif / ^_ \w * \z / . match ( uid_user ) nil else uid_user end else uid_user end end
Checks against the string returned by uid_user.
Checks against the string returned by uid_user .
# Required to allow testing in Travis CI (Linux). Otherwise not used