cab icon indicating copy to clipboard operation
cab copied to clipboard

Allow specifying a custom package database with --package-db

Open bergmark opened this issue 10 years ago • 2 comments

This isn't completely finished

This adds a --package-db flag so you can run cab from anywhere and also lets you use it with cabal-dev. You can run e.g. cab outdated --package-db=-package-db=/foo/bar/cabal-dev/packages-7.8.2.conf.

Are you okay with adding this feature?

I didn't quite understand what to do about the switches, i tried blindly adding it as seemed appropriate (not in this commit) but didn't get it working, I'd appreciate some help here! I temporarily commented out the checkOptions2 to test the rest.

bergmark avatar May 24 '14 08:05 bergmark

cab supports cabal's sandbox. cab automatically detects the sandbox. If I remember correctly, cab used to support cabal-dev but the support is now obsoleted. I would not like to support cabal-dev again without strong reasons.

kazu-yamamoto avatar Jun 03 '14 07:06 kazu-yamamoto

This isn't cabal-dev specific, you can also use it with cabal sandboxes if you call cab from another directory or you have the sandbox in a custom location. For instance: We use a separate sandbox for each git branch we are working on and need to invoke a script to figure out where that sandbox is located.

bergmark avatar Jun 03 '14 12:06 bergmark