Skip to content

cabal install should change directory before building a local package #1236

Closed
@dmwit

Description

@dmwit

When using cabal-install to install a local package (by which I mean one which is unpacked and sitting in a directory on the hard drive), cabal should cd into the directory the package is in before attempting to configure/build it, so that local resources are available via relative paths. I've put a minimal package which demonstrates the problem at http://dmwit.com/tmp.tar.gz; unpack the tar and compare the output of the following two commands:

cd tmp/foo && cabal install && cd -
cabal install tmp/foo

The former succeeds; the latter fails.

This is biting me in gtk2hs, where I sometimes wish to re-install several packages with a command like "cabal install ./cairo ./gtk" rather than the more unwieldy and fragile "cd cairo && cabal install --force-reinstalls && cd ../gtk && cabal install && cd ..".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions