macOS: fix command parsing in NewTerminalIntent (#12392)

Fixes #12391, regression from #10765
This commit is contained in:
Mitchell Hashimoto
2026-04-23 06:34:54 -07:00
committed by GitHub

View File

@@ -67,8 +67,8 @@ struct NewTerminalIntent: AppIntent {
// We don't run command as "command" and instead use "initialInput" so
// that we can get all the login scripts to setup things like PATH.
if let command {
config.initialInput = "\(Ghostty.Shell.quote(command)); exit\n"
if let command, !command.isEmpty {
config.initialInput = "\(command); exit\n"
}
// If we were given a working directory then open that directory