File 0001-Clear-the-arguments-if-the-command-is-not-found.patch of Package konsole.18950
From 09d20dea109050b4c02fb73095f327b5642a2b75 Mon Sep 17 00:00:00 2001
From: Kurt Hindenburg <kurt.hindenburg@gmail.com>
Date: Wed, 28 May 2025 18:54:39 -0400
Subject: [PATCH] Clear the arguments if the command is not found
This mimics what other terminals do.
(cherry picked from commit 39ffddb77763a32bc3f039514265506c6be73d48)
---
src/session/Session.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/session/Session.cpp b/src/session/Session.cpp
index e821e46..2b662fe 100644
--- a/src/session/Session.cpp
+++ b/src/session/Session.cpp
@@ -521,8 +521,10 @@ void Session::run()
// if a program was specified via setProgram(), but it couldn't be found (but a fallback was), print a warning
if (exec != checkProgram(_program)) {
terminalWarning(i18n("Could not find '%1', starting '%2' instead. Please check your profile settings.", _program, exec));
+ _arguments.clear(); // ignore args if program is invalid
} else if (exec != checkProgram(exec)) {
terminalWarning(i18n("Could not find '%1', starting '%2' instead. Please check your profile settings.", exec, checkProgram(exec)));
+ _arguments.clear(); // ignore args if program is invalid
}
// if no arguments are specified, fall back to program name
--
2.49.0