mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-22 14:06:02 +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()
|
||||
|
||||
// The command comes pre-formatted from Rust, just launch it
|
||||
// This avoids double escaping issues
|
||||
// Properly escape the directory path for shell
|
||||
let escapedDir = expandedWorkingDir.replacingOccurrences(of: "\\", with: "\\\\")
|
||||
.replacingOccurrences(of: "\"", with: "\\\"")
|
||||
let fullCommand = "cd \"\(escapedDir)\" && \(command)"
|
||||
|
||||
// Pass the working directory separately to avoid double-escaping issues
|
||||
// Get the preferred terminal or fallback
|
||||
let terminal = getValidTerminal()
|
||||
|
||||
// Launch with configuration
|
||||
// Launch with configuration - let TerminalLaunchConfig handle the escaping
|
||||
let config = TerminalLaunchConfig(
|
||||
command: fullCommand,
|
||||
workingDirectory: nil,
|
||||
command: command,
|
||||
workingDirectory: expandedWorkingDir,
|
||||
terminal: terminal
|
||||
)
|
||||
try launchWithConfig(config)
|
||||
|
|
|
|||
Loading…
Reference in a new issue