Fixed a bug in run dialogue that could cause some applications to close as soon as they open.

This commit is contained in:
Storm Dragon
2026-08-03 14:34:16 -04:00
parent ebe9cdb4e0
commit 02e8472147
+5 -5
View File
@@ -453,7 +453,7 @@ class RunDialog(Gtk.Window):
process = subprocess.Popen( process = subprocess.Popen(
command, command,
stdout=subprocess.DEVNULL, stdout=subprocess.DEVNULL,
stderr=subprocess.PIPE, stderr=subprocess.DEVNULL,
text=True, text=True,
start_new_session=True, start_new_session=True,
) )
@@ -473,12 +473,12 @@ class RunDialog(Gtk.Window):
Gtk.main_quit() Gtk.main_quit()
return False return False
error_text = process.stderr.read(2000).strip()
if not error_text:
error_text = "No additional error details were provided."
self.show_all() self.show_all()
self.entry.grab_focus() self.entry.grab_focus()
self.show_error(f"Could not open {description}.\n\n{error_text}") self.show_error(
f"Could not open {description}.\n\n"
"No additional error details were provided."
)
return False return False
def show_error(self, message): def show_error(self, message):