Skip to content

Commit e8cd369

Browse files
committed
Warn that inDir is not thread-safe.
Signed-off-by: Edward Z. Yang <[email protected]>
1 parent 535f41d commit e8cd369

File tree

1 file changed

+3
-0
lines changed
  • cabal-install/Distribution/Client

1 file changed

+3
-0
lines changed

cabal-install/Distribution/Client/Utils.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ withTempFileName tmpDir template action =
129129
(\(name, h) -> hClose h >> action name)
130130

131131
-- | Executes the action in the specified directory.
132+
--
133+
-- Warning: This operation is NOT thread-safe, because current
134+
-- working directory is a process-global concept.
132135
inDir :: Maybe FilePath -> IO a -> IO a
133136
inDir Nothing m = m
134137
inDir (Just d) m = do

0 commit comments

Comments
 (0)