File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 6
6
# the test suite) and we need to create a dev drive. This script automatically
7
7
# configures the appropriate drive.
8
8
9
- # Note we use `Get-PSDrive` is not sufficient because the drive letter is assigned.
9
+ # Note `Get-PSDrive` is not sufficient because the drive letter is assigned.
10
10
if (Test-Path " D:\" ) {
11
11
Write-Output " Using existing drive at D:"
12
12
$Drive = " D:"
13
- } else {
13
+ # If `New-VHD` is available (as it is on GitHub runners), create a virtual drive
14
+ } elseif (Get-Command New-VHD - ErrorAction SilentlyContinue) {
14
15
# The size (20 GB) is chosen empirically to be large enough for our
15
16
# workflows; larger drives can take longer to set up.
16
17
$Volume = New-VHD - Path C:/ uv_dev_drive.vhdx - SizeBytes 20 GB |
@@ -38,6 +39,11 @@ if (Test-Path "D:\") {
38
39
fsutil devdrv query $Drive
39
40
40
41
Write-Output " Using Dev Drive at $Volume "
42
+ # On some runners, i.e., Depot's beta Windows runners — Hyper-V is not available
43
+ # and we can't create an optimized drive
44
+ } else {
45
+ Write-Output " Hyper-V is not available, using existing drive at C:"
46
+ $Drive = " C:"
41
47
}
42
48
43
49
$Tmp = " $ ( $Drive ) \uv-tmp"
You can’t perform that action at this time.
0 commit comments