Skip to content

Commit

Permalink
Merge pull request #5211 from wazuh/enhancement/5203-replace-getlogin…
Browse files Browse the repository at this point in the history
…-for-getuser

Replace os.getlogin for getpass.getuser
  • Loading branch information
rauldpm authored Apr 12, 2024
2 parents 4db5df4 + bfbe444 commit fb7f85d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deployability/modules/testing/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This program is a free software; you can redistribute it and/or modify it under the terms of GPLv2

import json
import os
import getpass

from modules.generic import Ansible, Inventory
from modules.generic.utils import Utils
Expand Down Expand Up @@ -50,7 +50,7 @@ def run(cls, payload: InputPayload) -> None:

# Set extra vars
extra_vars['local_host_path'] = str(Path(__file__).parent.parent.parent)
extra_vars['current_user'] = os.getlogin()
extra_vars['current_user'] = getpass.getuser()

logger.debug(f"Using extra vars: {extra_vars}")

Expand Down

0 comments on commit fb7f85d

Please sign in to comment.