Export CMUX_SOCKET alongside CMUX_SOCKET_PATH in terminal env (#1991)
* Export CMUX_SOCKET alongside CMUX_SOCKET_PATH in terminal environment The app only exported CMUX_SOCKET_PATH when setting up the terminal environment, but some scripts and hooks (e.g. claude-hook) expect CMUX_SOCKET. The CLI launcher code already exports both (cmux.swift lines 9288-9289), but the app-side terminal setup was missing the alias. This caused claude-hook stop to fail with 'TabManager not available' when CMUX_SOCKET was empty. Fixes #1905 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Cache socketPath to avoid redundant call Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
818864dd4a
commit
bc9f884e69
1 changed files with 4 additions and 1 deletions
|
|
@ -3335,7 +3335,10 @@ final class TerminalSurface: Identifiable, ObservableObject {
|
|||
// Backward-compatible shell integration keys used by existing scripts/tests.
|
||||
setManagedEnvironmentValue("CMUX_PANEL_ID", id.uuidString)
|
||||
setManagedEnvironmentValue("CMUX_TAB_ID", tabId.uuidString)
|
||||
setManagedEnvironmentValue("CMUX_SOCKET_PATH", SocketControlSettings.socketPath())
|
||||
let socketPath = SocketControlSettings.socketPath()
|
||||
setManagedEnvironmentValue("CMUX_SOCKET_PATH", socketPath)
|
||||
// Backward-compatible alias expected by older scripts and third-party integrations.
|
||||
setManagedEnvironmentValue("CMUX_SOCKET", socketPath)
|
||||
if let bundledCLIURL = Bundle.main.resourceURL?.appendingPathComponent("bin/cmux"),
|
||||
FileManager.default.isExecutableFile(atPath: bundledCLIURL.path) {
|
||||
setManagedEnvironmentValue("CMUX_BUNDLED_CLI_PATH", bundledCLIURL.path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue