mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-27 15:17:38 +00:00
fix escaping
This commit is contained in:
parent
95cec4c801
commit
db1583b88b
1 changed files with 4 additions and 9 deletions
|
|
@ -507,19 +507,14 @@ final class TerminalLauncher {
|
||||||
let ttyFwd = ttyFwdPath ?? findTTYFwdBinary()
|
let ttyFwd = ttyFwdPath ?? findTTYFwdBinary()
|
||||||
|
|
||||||
// The command comes pre-formatted from Rust, just launch it
|
// The command comes pre-formatted from Rust, just launch it
|
||||||
// This avoids double escaping issues
|
// Pass the working directory separately to avoid double-escaping issues
|
||||||
// Properly escape the directory path for shell
|
|
||||||
let escapedDir = expandedWorkingDir.replacingOccurrences(of: "\\", with: "\\\\")
|
|
||||||
.replacingOccurrences(of: "\"", with: "\\\"")
|
|
||||||
let fullCommand = "cd \"\(escapedDir)\" && \(command)"
|
|
||||||
|
|
||||||
// Get the preferred terminal or fallback
|
// Get the preferred terminal or fallback
|
||||||
let terminal = getValidTerminal()
|
let terminal = getValidTerminal()
|
||||||
|
|
||||||
// Launch with configuration
|
// Launch with configuration - let TerminalLaunchConfig handle the escaping
|
||||||
let config = TerminalLaunchConfig(
|
let config = TerminalLaunchConfig(
|
||||||
command: fullCommand,
|
command: command,
|
||||||
workingDirectory: nil,
|
workingDirectory: expandedWorkingDir,
|
||||||
terminal: terminal
|
terminal: terminal
|
||||||
)
|
)
|
||||||
try launchWithConfig(config)
|
try launchWithConfig(config)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue