mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
container: Avoid pop-ups on Windows
Avoid window pop-ups on Windows systems, by using the `startupinfo` argument of `subprocess.run`.
This commit is contained in:
parent
756945931f
commit
b6f399be6e
1 changed files with 4 additions and 1 deletions
|
@ -67,7 +67,10 @@ class Container(IsolationProvider):
|
||||||
cmd = [runtime, "version", "-f", query]
|
cmd = [runtime, "version", "-f", query]
|
||||||
try:
|
try:
|
||||||
version = subprocess.run(
|
version = subprocess.run(
|
||||||
cmd, capture_output=True, check=True
|
cmd,
|
||||||
|
startupinfo=get_subprocess_startupinfo(),
|
||||||
|
capture_output=True,
|
||||||
|
check=True,
|
||||||
).stdout.decode()
|
).stdout.decode()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
msg = f"Could not get the version of the {runtime.capitalize()} tool: {e}"
|
msg = f"Could not get the version of the {runtime.capitalize()} tool: {e}"
|
||||||
|
|
Loading…
Reference in a new issue