Uploaded image for project: 'Swift'
  1. Swift
  2. SR-1174

[llbuild] Properly escape verbose command descriptions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Done
    • Component/s: llbuild
    • Labels:

      Description

      llbuild has a number of places where it prints out a command line to the console. When doing so, we should quote the command such that it will execute properly if rerun from the shell, which requires performing shell escaping.

      For example:

      $ cat t.llbuild 
      client:
        name: basic
        version: 0
      
      targets:
        "": ["<dummy>"]
      
      commands:
        C.dummy:
          tool: shell
          args: ["echo", "hello \"world\"!"]
          outputs: ["<dummy>"]
      
      $ llbuild buildsystem build --no-db -f t.llbuild 
      echo "hello "world"!"
      hello "world"!
      

      The first command printed there echo "hello "world"!" is not escaped properly.

        Attachments

          Activity

            People

            Assignee:
            aciid Ankit Aggarwal
            Reporter:
            ddunbar Daniel Dunbar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: