Skip to content

Commit fe06c3e

Browse files
committed
Move docker sandbox into .stack-work (#247)
1 parent 1abc03a commit fe06c3e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Stack/Constants.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ rawGithubUrl org repo branch file = T.concat
169169

170170
-- | Docker sandbox from project root.
171171
projectDockerSandboxDir :: Path Abs Dir -> Path Abs Dir
172-
projectDockerSandboxDir projectRoot = projectRoot </> $(mkRelDir ".docker-sandbox/")
172+
projectDockerSandboxDir projectRoot = projectRoot </> workDirRel </> $(mkRelDir "docker/")
173173

174174
-- | Name of the 'stack' program.
175175
stackProgName :: String

src/Stack/Docker.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ runContainerAndExit config
198198
sandboxIDDir <- parseRelDir (sandboxID ++ "/")
199199
let stackRoot = configStackRoot config
200200
sandboxDir = projectDockerSandboxDir projectRoot
201-
sandboxSandboxDir = sandboxDir </> $(mkRelDir ".sandbox/") </> sandboxIDDir
201+
sandboxSandboxDir = sandboxDir </> $(mkRelDir "_sandbox/") </> sandboxIDDir
202202
sandboxHomeDir = sandboxDir </> homeDirName
203203
sandboxRepoDir = sandboxDir </> sandboxIDDir
204204
sandboxSubdirs = map (\d -> sandboxRepoDir </> d)
@@ -622,9 +622,9 @@ sandboxedHomeSubdirectories =
622622
,$(mkRelDir ".cabal/")
623623
,$(mkRelDir ".ghcjs/")]
624624

625-
-- | Name of home directory within @.docker-sandbox@.
625+
-- | Name of home directory within docker sandbox.
626626
homeDirName :: Path Rel Dir
627-
homeDirName = $(mkRelDir ".home/")
627+
homeDirName = $(mkRelDir "_home/")
628628

629629
-- | Options parser configuration for Docker.
630630
dockerOptsParser :: Bool -> Parser DockerOptsMonoid
@@ -839,7 +839,7 @@ data StackDockerException
839839
| ResolverNotSupportedException Resolver
840840
-- ^ Only LTS resolvers are supported for default image tag.
841841
| CannotDetermineProjectRootException
842-
-- ^ Can't determine the project root (where to put @.docker-sandbox@).
842+
-- ^ Can't determine the project root (where to put docker sandbox).
843843
| DockerNotInstalledException
844844
-- ^ @docker --version@ failed.
845845
| InvalidDatabasePathException SomeException

0 commit comments

Comments
 (0)