File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -717,13 +717,15 @@ entrypoint config@Config{..} DockerEntrypoint{..} = do
717717 -- its original home directory to the host's stack root, to avoid needing to download them
718718 origStackHomeDir <- parseAbsDir (User. homeDirectory ue)
719719 let origStackRoot = origStackHomeDir </> $ (mkRelDir (" ." ++ stackProgName))
720- (_, buildPlans) <- listDirectory (buildPlanDir origStackRoot)
721- forM_ buildPlans $ \ srcBuildPlan -> do
722- let destBuildPlan = buildPlanDir configStackRoot </> filename srcBuildPlan
723- exists <- fileExists destBuildPlan
724- unless exists $ do
725- createTree (parent destBuildPlan)
726- copyFile srcBuildPlan destBuildPlan
720+ buildPlanDirExists <- dirExists (buildPlanDir origStackRoot)
721+ when buildPlanDirExists $ do
722+ (_, buildPlans) <- listDirectory (buildPlanDir origStackRoot)
723+ forM_ buildPlans $ \ srcBuildPlan -> do
724+ let destBuildPlan = buildPlanDir configStackRoot </> filename srcBuildPlan
725+ exists <- fileExists destBuildPlan
726+ unless exists $ do
727+ createTree (parent destBuildPlan)
728+ copyFile srcBuildPlan destBuildPlan
727729 forM_ configPackageIndices $ \ pkgIdx -> do
728730 msrcIndex <- flip runReaderT (config{configStackRoot = origStackRoot}) $ do
729731 srcIndex <- configPackageIndex (indexName pkgIdx)
You can’t perform that action at this time.
0 commit comments