Skip to content

Commit 1094c25

Browse files
committed
Spacing and comments
1 parent 32c2d1d commit 1094c25

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

src/Stack/Docker.hs

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,21 +72,20 @@ import System.Posix.Signals (installHandler,sigTERM,Handler(Catch))
7272
rerunWithOptionalContainer :: (MonadLogger m,MonadIO m,MonadThrow m,MonadBaseControl IO m)
7373
=> Config -> Maybe (Path Abs Dir) -> IO () -> m ()
7474
rerunWithOptionalContainer config mprojectRoot =
75-
rerunCmdWithOptionalContainer config mprojectRoot getCmdArgs
76-
where
77-
getCmdArgs =
78-
do args <- getArgs
79-
if arch == "x86_64" && os == "linux"
80-
then do exePath <- getExecutablePath
81-
let mountDir = concat ["/tmp/host-",stackProgName]
82-
mountPath = concat [mountDir,"/",takeBaseName exePath]
83-
return (mountPath
84-
,args
85-
,config{configDocker=docker{dockerMount=Mount exePath mountPath :
86-
dockerMount docker}})
87-
else do progName <- getProgName
88-
return (takeBaseName progName,args,config)
89-
docker = configDocker config
75+
rerunCmdWithOptionalContainer config mprojectRoot getCmdArgs
76+
where
77+
getCmdArgs =
78+
do args <- getArgs
79+
if arch == "x86_64" && os == "linux"
80+
then do exePath <- getExecutablePath
81+
let mountPath = concat ["/opt/host/bin/",takeBaseName exePath]
82+
return (mountPath
83+
,args
84+
,config{configDocker=docker{dockerMount=Mount exePath mountPath :
85+
dockerMount docker}})
86+
else do progName <- getProgName
87+
return (takeBaseName progName,args,config)
88+
docker = configDocker config
9089

9190
-- | If Docker is enabled, re-runs the OS command returned by the second argument in a
9291
-- Docker container. Otherwise, runs the inner action.
@@ -710,7 +709,7 @@ dockerOptsFromMonoid mproject stackRoot DockerOptsMonoid{..} = DockerOpts
710709
Nothing -> ""
711710
Just proj ->
712711
case projectResolver proj of
713-
ResolverSnapshot n@(LTS _ _) -> ":" ++ (T.unpack (renderSnapName n))
712+
ResolverSnapshot n@(LTS _ _) -> ":" ++ T.unpack (renderSnapName n)
714713
_ -> throw (ResolverNotSupportedException (projectResolver proj))
715714
in case dockerMonoidRepoOrImage of
716715
Nothing -> "fpco/stack-build" ++ defaultTag

src/Stack/Types/Docker.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ data DockerOptsMonoid = DockerOptsMonoid
5151
,dockerMonoidEnable :: !(Maybe Bool)
5252
-- ^ Is using Docker enabled?
5353
,dockerMonoidRepoOrImage :: !(Maybe DockerMonoidRepoOrImage)
54-
-- ^ Docker repository name (e.g. @fpco/dev@ or @fpco/dev:lts-2.8@)
54+
-- ^ Docker repository name (e.g. @fpco/stack-build@ or @fpco/stack-full:lts-2.8@)
5555
,dockerMonoidRegistryLogin :: !(Maybe Bool)
5656
-- ^ Does registry require login for pulls?
5757
,dockerMonoidRegistryUsername :: !(Maybe String)

0 commit comments

Comments
 (0)