loggedInUser property

String get loggedInUser

returns the username of the logged in user.

Implementation

String get loggedInUser {
  var user = _whoami();
  if (user == 'root') {
    user = env['SUDO_USER'] ?? 'root';
  }
  verbose(() => 'loggedInUser: $user');
  return user;
}