mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-13 18:07:20 -06:00
Adds dependency validation for copying drivers
Prevents an invalid configuration state by ensuring the build USB drive option is explicitly requested whenever the copy drivers option is specified.
This commit is contained in:
@@ -5126,6 +5126,12 @@ if ($LongPathsEnabled -ne 1) {
|
||||
Set-Progress -Percentage 2 -Message "Validating parameters..."
|
||||
###PARAMETER VALIDATION
|
||||
|
||||
#Validate CopyDrivers dependency on BuildUSBDrive
|
||||
if ($CopyDrivers -and (-not $BuildUSBDrive)) {
|
||||
WriteLog "-CopyDrivers is set to `$true, but -BuildUSBDrive is not set to `$true"
|
||||
throw "-CopyDrivers is set to `$true, but -BuildUSBDrive is not set to `$true. Please set -BuildUSBDrive to `$true and try again."
|
||||
}
|
||||
|
||||
#Validate drivers folder
|
||||
if ($InstallDrivers -or $CopyDrivers) {
|
||||
WriteLog 'Doing driver validation'
|
||||
|
||||
Reference in New Issue
Block a user