Uploaded image for project: 'Buildr (Retired)'
  1. Buildr (Retired)
  2. BUILDR-124

unzip(...).from_path does not work correctly without include

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3.2
    • 1.3.3
    • Core features
    • None
    • Tested on OS X 10.5.4, built-in ruby 1.8.6, but will appear on all platforms

    Description

      An unzip invocation like this:

      unzip("target" => zip).from_path("base/lib")

      will not include only the files in "base/lib" in "target." The files in "base/lib" will be extracted so they are rooted at "target", but all the files in the archive will also be extracted, using their paths as described in the zip file.

      This happens because Unzip::FromPath doesn't filter out the other files. A workaround is to include an exclude clause which will remove all the other files. E.g.:

      unzip("target" => zip).from_path("base/lib").exclude("base/*/")

      Attachments

        1. BUILDR-124.patch
          2 kB
          Rhett Sutphin

        Activity

          People

            Unassigned Unassigned
            rsutphin Rhett Sutphin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment