Removes drivers.json file requirement for local drivers

This commit is contained in:
rbalsleyMSFT
2025-08-04 18:34:26 -07:00
parent 9cb06cb71e
commit 08feb7c9dd
+3 -7
View File
@@ -3740,14 +3740,10 @@ if ($InstallDrivers -or $CopyDrivers) {
throw "-InstallDrivers or -CopyDrivers is set to `$true, but the $DriversFolder folder is missing" throw "-InstallDrivers or -CopyDrivers is set to `$true, but the $DriversFolder folder is missing"
} }
if ((Get-ChildItem -Path $DriversFolder -Recurse | Measure-Object -Property Length -Sum).Sum -lt 1MB) { if ((Get-ChildItem -Path $DriversFolder -Recurse | Measure-Object -Property Length -Sum).Sum -lt 1MB) {
WriteLog "-InstallDrivers or -CopyDrivers is set to `$true, but the $DriversFolder folder is empty" WriteLog "-InstallDrivers or -CopyDrivers is set to `$true, but the $DriversFolder folder is empty, and no drivers are specified for download."
throw "-InstallDrivers or -CopyDrivers is set to `$true, but the $DriversFolder folder is empty" throw "-InstallDrivers or -CopyDrivers is set to `$true, but the $DriversFolder folder is empty, and no drivers are specified for download."
} }
if (!(Test-Path -Path $DriversJsonPath)) { WriteLog "Drivers folder found with content. Will use existing drivers."
WriteLog "-InstallDrivers or -CopyDrivers is set to `$true, but the $DriversJsonPath file is missing"
throw "-InstallDrivers or -CopyDrivers is set to `$true, but the $DriversJsonPath file is missing"
}
WriteLog 'Driver validation complete'
} }
} }
#Validate PEDrivers folder #Validate PEDrivers folder