File tree Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -218,6 +218,9 @@ Other enhancements:
218
218
on the PATH or shadowed by another entry.
219
219
* Allow running tests on tarball created by sdist and upload
220
220
[ #717 ] ( https://github.com/commercialhaskell/stack/issues/717 ) .
221
+ * For filesystem setup-info paths, it's no longer assumed that the
222
+ directory is writable, instead a temp dir is used. See
223
+ [ #3188 ] ( https://github.com/commercialhaskell/stack/issues/3188 ) .
221
224
222
225
Bug fixes:
223
226
Original file line number Diff line number Diff line change @@ -1369,26 +1369,19 @@ withUnpackedTarball7z name si archiveFile archiveType msrcDir destDir = do
1369
1369
TarGz -> return " .gz"
1370
1370
_ -> throwString $ name ++ " must be a tarball file"
1371
1371
tarFile <-
1372
- case T. stripSuffix suffix $ T. pack $ toFilePath archiveFile of
1372
+ case T. stripSuffix suffix $ T. pack $ toFilePath (filename archiveFile) of
1373
1373
Nothing -> throwString $ " Invalid " ++ name ++ " filename: " ++ show archiveFile
1374
- Just x -> parseAbsFile $ T. unpack x
1374
+ Just x -> parseRelFile $ T. unpack x
1375
1375
run7z <- setup7z si
1376
1376
let tmpName = toFilePathNoTrailingSep (dirname destDir) ++ " -tmp"
1377
1377
ensureDir (parent destDir)
1378
1378
withRunInIO $ \ run -> withTempDir (parent destDir) tmpName $ \ tmpDir -> run $ do
1379
1379
liftIO $ ignoringAbsence (removeDirRecur destDir)
1380
- run7z (parent archiveFile) archiveFile
1381
- run7z tmpDir tarFile
1380
+ run7z tmpDir archiveFile
1381
+ run7z tmpDir (tmpDir </> tarFile)
1382
1382
absSrcDir <- case msrcDir of
1383
1383
Just srcDir -> return $ tmpDir </> srcDir
1384
1384
Nothing -> expectSingleUnpackedDir archiveFile tmpDir
1385
- removeFile tarFile `catchIO` \ e ->
1386
- logWarn (T. concat
1387
- [ " Exception when removing "
1388
- , T. pack $ toFilePath tarFile
1389
- , " : "
1390
- , T. pack $ show e
1391
- ])
1392
1385
renameDir absSrcDir destDir
1393
1386
1394
1387
expectSingleUnpackedDir :: (MonadIO m , MonadThrow m ) => Path Abs File -> Path Abs Dir -> m (Path Abs Dir )
You can’t perform that action at this time.
0 commit comments