mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 01:14:15 +02:00
[arch] fix -> 'rebuild-detector' integration not working when launched from KDE menu or PyCharm
This commit is contained in:
@@ -323,7 +323,7 @@ def check_enabled_services(*names: str) -> Dict[str, bool]:
|
||||
return {s: status[i].strip().lower() == 'enabled' for i, s in enumerate(names) if s}
|
||||
|
||||
|
||||
def execute(cmd: str, shell: bool = False, cwd: Optional[str] = None, output: bool = True, custom_env: Optional[dict] = None) -> Tuple[int, Optional[str]]:
|
||||
def execute(cmd: str, shell: bool = False, cwd: Optional[str] = None, output: bool = True, custom_env: Optional[dict] = None, stdin: bool = True) -> Tuple[int, Optional[str]]:
|
||||
params = {
|
||||
'args': cmd.split(' ') if not shell else [cmd],
|
||||
'stdout': subprocess.PIPE if output else subprocess.DEVNULL,
|
||||
@@ -331,6 +331,9 @@ def execute(cmd: str, shell: bool = False, cwd: Optional[str] = None, output: bo
|
||||
'shell': shell
|
||||
}
|
||||
|
||||
if not stdin:
|
||||
params['stdin'] = subprocess.DEVNULL
|
||||
|
||||
if cwd is not None:
|
||||
params['cwd'] = cwd
|
||||
|
||||
|
||||
Reference in New Issue
Block a user