mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-10 03:04:15 +02:00
[arch] feature: allowing AUR packages to be installed when bauh is launched by the root user
This commit is contained in:
8
bauh/gems/arch/sshell.py
Normal file
8
bauh/gems/arch/sshell.py
Normal 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
|
||||
Reference in New Issue
Block a user