Skip to content

Commit fe4d0f1

Browse files
committed
💄Add warning about PSDepend target being ignored
1 parent b26811d commit fe4d0f1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ModuleFast.psm1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1063,11 +1063,14 @@ function ConvertFrom-PSDepend {
10631063
$initialSpec = [ordered]@{}
10641064

10651065
if ($PSDependManifest.ContainsKey('PSDependOptions')) {
1066+
Write-Debug 'PSDepend Parse: PSDependOptions detected. Removing...'
10661067
$options = $PSDependManifest['PSDependOptions']
10671068
if ($options.DependencyType) {
10681069
throw [NotSupportedException]"PSDepend Parse: Top-Level DependencyType in PSDependOptions is not currently supported."
10691070
}
1070-
Write-Debug 'PSDepend Parse: PSDependOptions detected. Removing...'
1071+
if ($options.Target) {
1072+
Write-Warning "PSDepend Parse: Target in PSDependOptions is not currently supported and will be ignored. Ensure you have -Destination $($options.Target) specified on the Install-ModuleFast command."
1073+
}
10711074
$PSDependManifest.Remove('PSDependOptions')
10721075
}
10731076

0 commit comments

Comments
 (0)