mirror of https://github.com/sbt/sbt.git
Merge pull request #7979 from eed3si9n/wip/retry
This commit is contained in:
commit
439e24fb84
|
|
@ -18,7 +18,7 @@ import java.nio.file.{ Files, Path, Paths, StandardOpenOption }
|
|||
import java.security.MessageDigest
|
||||
import scala.jdk.CollectionConverters.*
|
||||
import scala.quoted.*
|
||||
import sbt.io.Hash
|
||||
import sbt.io.{ Hash, IO }
|
||||
|
||||
/**
|
||||
* - nonCpOptions - non-classpath options
|
||||
|
|
@ -35,7 +35,7 @@ class Eval(
|
|||
import Eval.*
|
||||
|
||||
backingDir.foreach { dir =>
|
||||
Files.createDirectories(dir)
|
||||
IO.createDirectory(dir.toFile())
|
||||
}
|
||||
private val outputDir =
|
||||
backingDir match
|
||||
|
|
|
|||
|
|
@ -1200,7 +1200,7 @@ object BuiltinCommands {
|
|||
try {
|
||||
val version = sbtVersion(state)
|
||||
val skipFile = skipWelcomeFile(state, version)
|
||||
Files.createDirectories(skipFile.getParent)
|
||||
IO.createDirectory(skipFile.getParent.toFile())
|
||||
val suppress = !SysProp.banner || Files.exists(skipFile)
|
||||
if (!suppress) {
|
||||
Banner(version).foreach(banner => state.log.info(banner))
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ private[sbt] object InstallSbtn {
|
|||
|
||||
private[sbt] def extractSbtn(term: Terminal, version: String, sbtZip: Path, sbtn: Path): Unit = {
|
||||
downloadRelease(term, version, sbtZip)
|
||||
Files.createDirectories(sbtn.getParent)
|
||||
IO.createDirectory(sbtn.getParent().toFile())
|
||||
val bin =
|
||||
if (Properties.isWin) "pc-win32.exe"
|
||||
else if (Properties.isLinux) "pc-linux"
|
||||
|
|
@ -140,7 +140,7 @@ private[sbt] object InstallSbtn {
|
|||
}
|
||||
}
|
||||
private def downloadCompletion(completion: String, version: String, target: Path): Unit = {
|
||||
Files.createDirectories(target.getParent)
|
||||
IO.createDirectory(target.getParent().toFile())
|
||||
val comp = s"https://raw.githubusercontent.com/sbt/sbt/v$version/client/completions/$completion"
|
||||
transfer(new URI(comp).toURL.openStream, target)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ class DiskActionCacheStore(base: Path, converter: FileConverter) extends Abstrac
|
|||
// On Windows, the program has be running under the Administrator privileges or the
|
||||
// user enable Developer Mode on Windows 10+ to create symbolic links.
|
||||
def writeFileAndNotify(outPath: Path): Path =
|
||||
Files.createDirectories(outPath.getParent())
|
||||
IO.createDirectory(outPath.getParent().toFile())
|
||||
val result = Retry:
|
||||
if Files.exists(outPath) then IO.delete(outPath.toFile())
|
||||
if symlinkSupported.get() then
|
||||
|
|
@ -314,7 +314,7 @@ class DiskActionCacheStore(base: Path, converter: FileConverter) extends Abstrac
|
|||
*/
|
||||
private def unpackageDirZip(dirzip: Path, outputDirectory: Path): Path =
|
||||
val dirPath = Paths.get(dirzip.toString.dropRight(ActionCache.dirZipExt.size))
|
||||
Files.createDirectories(dirPath)
|
||||
IO.createDirectory(dirPath.toFile())
|
||||
val allPaths = mutable.Set(
|
||||
FileTreeView.default
|
||||
.list(dirPath.toGlob / ** / "*")
|
||||
|
|
|
|||
Loading…
Reference in New Issue