Skip to content
Unverified Commit 5205c177 authored by Jonas Devlieghere's avatar Jonas Devlieghere
Browse files

[lldb] Fix escaping when launching in terminal with AppleScript

Fix escaping when launching in terminal with AppleScript. The invocation
we're building up is wrapped in single quotes when passed to bash and
wrapped in double quotes for AppleScript.

Here's an example invocation with the new escaping:

  tell application "Terminal"
    activate
          do script "/bin/bash -c 'arch -arch arm64 'darwin-debug'
            --unix-socket=/tmp/dL2jSh --arch=arm64 --working-dir
            \"/private/tmp/with spaces\" --disable-aslr --  \"foo\"
            \"bar\" \"baz\" ; echo Process exited with status $?';exit"
  end tell

Previously we were using unescaped single quotes which resulted in the
whole bash invocation being passed in pieces. That works most of the
time but breaks when you have a space in your current working directory
for example.

rdar://91870763

Differential revision: https://reviews.llvm.org/D124568
parent 7d67a1e4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment