$ cabal sandbox init
$ cabal install --builddir=foo
The generated build directory is dist instead of foo.
Happens only with the install command. This is because we want to set the builddir to dist/dist-sandbox-$SANDBOX_DIR_HASH for add-source-dependencies (see #1281), but in installAction it actually gets set for all packages in the install plan. Maybe there's a way to fix this.
This bug affects the test suite runner (we try to put all products in a special working directory, but sandbox dist dirs are not moved.)