[arch] feature: allowing AUR packages to be installed when bauh is launched by the root user

This commit is contained in:
Vinicius Moreira
2021-12-07 15:41:02 -03:00
parent afcc94b934
commit 6d3917ee99
21 changed files with 330 additions and 158 deletions

8
bauh/gems/arch/sshell.py Normal file
View File

@@ -0,0 +1,8 @@
from typing import Optional, Tuple
from bauh.commons.system import execute
def mkdir(dir_path: str, parent: bool = True, custom_user: Optional[str] = None) -> Tuple[bool, Optional[str]]:
code, output = execute(f'mkdir {"-p " if parent else ""}"{dir_path}"', shell=True, custom_user=custom_user)
return code == 0, output