Skip to content

Commit

Permalink
Force remove workspace directory
Browse files Browse the repository at this point in the history
  • Loading branch information
jhbertra committed Feb 7, 2023
1 parent fe7133e commit 1422912
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cardano-integration/src/Test/Integration/Workspace.hs
Expand Up @@ -20,7 +20,7 @@ import qualified Data.ByteString.Lazy as LBS
import Data.UUID (UUID)
import Data.UUID.V4 (nextRandom)
import qualified Data.Yaml as YAML
import System.Directory (copyFile, createDirectoryIfMissing, removeDirectoryRecursive, renameFile)
import System.Directory (copyFile, createDirectoryIfMissing, removePathForcibly, renameFile)
import System.FilePath (takeDirectory, (</>))
import System.IO (Handle, IOMode, hClose, openFile)
import UnliftIO.Resource (MonadResource, ReleaseKey, allocate)
Expand All @@ -36,7 +36,7 @@ createWorkspace :: MonadResource m => FilePath -> m Workspace
createWorkspace workspaceName = do
workspaceId <- liftIO nextRandom
let workspaceDir = "/tmp/workspaces" </> (workspaceName <> "-" <> show workspaceId)
releaseKey <- allocate_ (createDirectoryIfMissing True workspaceDir) $ removeDirectoryRecursive workspaceDir
releaseKey <- allocate_ (createDirectoryIfMissing True workspaceDir) $ removePathForcibly workspaceDir
pure Workspace{..}

resolveWorkspacePath :: Workspace -> FilePath -> FilePath
Expand Down

0 comments on commit 1422912

Please sign in to comment.