From 51262f80800188d203f44e4778dee37c6f275d4b Mon Sep 17 00:00:00 2001 From: DPTPhatUS Date: Sun, 30 Nov 2025 10:11:27 +0700 Subject: [PATCH] fix: Remove redundant single quotes in Linux terminal command The bash -c command was wrapped with extra single quotes around the script argument, causing the Start Server button to fail on Linux. Before: bash -c "'command; exec bash'" After: bash -c "command; exec bash" The double quotes are sufficient for bash -c to receive the command as a single argument. --- MCPForUnity/Editor/Services/ServerManagementService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MCPForUnity/Editor/Services/ServerManagementService.cs b/MCPForUnity/Editor/Services/ServerManagementService.cs index 5a031f88..50a57768 100644 --- a/MCPForUnity/Editor/Services/ServerManagementService.cs +++ b/MCPForUnity/Editor/Services/ServerManagementService.cs @@ -435,8 +435,8 @@ private System.Diagnostics.ProcessStartInfo CreateTerminalProcessStartInfo(strin // We use bash -c to execute the command, so we must properly quote/escape for bash // Escape single quotes for the inner bash string string escapedCommandLinux = command.Replace("'", "'\\''"); - // Wrap the command in single quotes for bash -c - string script = $"'{escapedCommandLinux}; exec bash'"; + // Build the script + string script = $"{escapedCommandLinux}; exec bash"; // Escape double quotes for the outer Process argument string string escapedScriptForArg = script.Replace("\"", "\\\""); string bashCmdArgs = $"bash -c \"{escapedScriptForArg}\"";