From f0c29d40892035d3f2a2a4ea004a4d2ea11d7d67 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Fri, 5 Nov 2021 14:48:53 -0300 Subject: [PATCH] [common] fix: some backend commands could hang when require user interaction --- CHANGELOG.md | 2 ++ bauh/commons/system.py | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa1b52bb..6ca37430 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - always displaying the "any file filter" (*) as the last option for file chooser components [#193](https://github.com/vinifmor/bauh/issues/193) ### Fixes +- Arch + - not able to install packages when launched by the root user - AppImage - not displaying the filter for any kind of file (*) when updating imported AppImages [#193](https://github.com/vinifmor/bauh/issues/193) - Flatpak diff --git a/bauh/commons/system.py b/bauh/commons/system.py index 77735ed0..d3b106c1 100644 --- a/bauh/commons/system.py +++ b/bauh/commons/system.py @@ -89,15 +89,13 @@ class SimpleProcess: args = { "stdout": subprocess.PIPE, "stderr": subprocess.STDOUT, + "stdin": stdin if stdin else subprocess.DEVNULL, "bufsize": -1, "cwd": cwd, "env": gen_env(global_interpreter, lang, extra_paths=extra_paths), "shell": self.shell } - if stdin: - args['stdin'] = stdin - return subprocess.Popen(args=[' '.join(cmd)] if self.shell else cmd, **args)