Skip to content

Commit 9c3e47d

Browse files
Create .unitysetup folder if not exist
Check and create .unitysetup folder before create sparsebundle to mount
1 parent aa70e5e commit 9c3e47d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

UnitySetup/UnitySetup.psm1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,6 +1005,12 @@ function Install-UnitySetupInstance {
10051005
if (-not $installPath.EndsWith([io.path]::DirectorySeparatorChar)) {
10061006
$installPath += [io.path]::DirectorySeparatorChar
10071007
}
1008+
1009+
# Make sure the folder .unitysetup exist before create sparsebundle
1010+
if (-not (Test-Path $Cache -PathType Container)) {
1011+
Write-Verbose "Creating directory $Cache."
1012+
New-Item $Cache -ItemType Directory -ErrorAction Stop | Out-Null
1013+
}
10081014

10091015
# Creating sparse bundle to host installing Unity in other locations
10101016
$unitySetupBundlePath = [io.path]::Combine($Cache, "UnitySetup.sparsebundle")

0 commit comments

Comments
 (0)