brew/Library
Carlo Cabrera a01715f0ee
resource: support relative paths as targets of #stage
`#stage` takes an optional `target` argument, which specifies the
location in which to unpack the `resource`.

Passing relative paths to `#stage`, as in

    resource("foo").stage "bar"

does not work, because this calls `Pathname("bar").install` inside the
temporary directory that the contents of the resource are unpacked to.
This means that passing a relative path to `#stage` has the unintended
effect of moving files around inside a temporary directory the formula
has no access to.

Let's fix that by keeping track of the original working directory before
`#stage` was called and prepending this to `target` whenever `target` is
a relative path.
2022-07-10 01:27:21 +08:00
..

Library

This directory contains all the code run by the official brew command in Homebrew and all formulae (package descriptions) in taps (repositories containing formulae) in Taps subdirectories.