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}\"";