Skip to content

Allow to specify sandbox location via environment variable #38

Open
hvr opened this Issue Sep 24, 2011 · 3 comments

3 participants

@hvr
hvr commented Sep 24, 2011

It would be convenient to be able to specify the default sandbox location (which currently seems hard-coded to ./cabal-dev) via an environment variable. The -s/--sandbox=DIR option should have always precedence over the location set via an environment variable.

@creswick
Owner

This seems reasonable to me - does anyone have suggestions for a name? I'm a /little/ concerned about name clashes, but that's probably just me being paranoid.

@hvr: in the short term, it should be easy to work around this with a shell script that inserts a variable of your choice and passes the remaining arguments on to cabal-dev.

This should work:

#!/bin/bash

CABAL_DEV=/path/to/cabal-dev
$CABAL_DEV --sandbox=$(eval 'echo '"$SANDBOX_VAR") "$@"
@hvr
hvr commented Sep 25, 2011

...what about a more or less verbose variable called CABAL_SANDBOX?

@lightquake

Just wanted to say that I wrote a script called sandboxer that takes care of this by wrapping cabal-dev using a script similar to creswick's.

If you wanted to be super fancy about it you could do something like the virtualenv-burrito approach and make all the sandboxes in ~/.cabal-dev/sandboxes/sandbox_name or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.