Skip to content

Commit b26811d

Browse files
authored
✨ Detect PSDepend file by PSDependOptions
PSDepend files were not being detected if they had a PSDependOptions key. They are now properly detected.
1 parent 454df48 commit b26811d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

ModuleFast.psm1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,7 @@ function ConvertFrom-PSDepend {
10671067
if ($options.DependencyType) {
10681068
throw [NotSupportedException]"PSDepend Parse: Top-Level DependencyType in PSDependOptions is not currently supported."
10691069
}
1070+
Write-Debug 'PSDepend Parse: PSDependOptions detected. Removing...'
10701071
$PSDependManifest.Remove('PSDependOptions')
10711072
}
10721073

@@ -1991,6 +1992,10 @@ function Select-RequiredSpecFileType ([IDictionary]$requiredSpec) {
19911992
Write-Debug 'SpecFile Parse: Auto-detected SpecFile type as PSDepend due to presence of :: or / in keys'
19921993
return [SpecFileType]::PSDepend
19931994
}
1995+
if ($key -eq 'PSDependOptions') {
1996+
Write-Debug 'SpecFile Parse: Auto-detected SpecFile type as PSDepend due to presence of PSDependOptions key'
1997+
return [SpecFileType]::PSDepend
1998+
}
19941999

19952000
if ($requiredSpec[$key] -is [IDictionary]) {
19962001
if ($requiredSpec[$key].ContainsKey('DependencyType')) {

0 commit comments

Comments
 (0)