diff --git a/Hawk/tests/general/Test-PreCommitHook.ps1 b/Hawk/tests/general/Test-PreCommitHook.ps1 index 5c5e421..c3626ea 100644 --- a/Hawk/tests/general/Test-PreCommitHook.ps1 +++ b/Hawk/tests/general/Test-PreCommitHook.ps1 @@ -5,7 +5,7 @@ # 3. Observe the PSScriptAnalyzer warnings/errors #region Good Code Examples - These will pass PSScriptAnalyzer -# test +# tests function Test-GoodFunction { [CmdletBinding()] param ( diff --git a/build/vsts-prerequisites.ps1 b/build/vsts-prerequisites.ps1 index c358533..c72baa2 100644 --- a/build/vsts-prerequisites.ps1 +++ b/build/vsts-prerequisites.ps1 @@ -10,17 +10,17 @@ $modules = @("Pester", "PSFramework", "PSModuleDevelopment") # Automatically add missing dependencies # TODO: uncomment this block of code below and fix RobustCloudCommand error. -# $data = Import-PowerShellDataFile -Path "$PSScriptRoot\..\Hawk\Hawk.psd1" -# foreach ($dependency in $data.RequiredModules) { -# if ($dependency -is [string]) { -# if ($modules -contains $dependency) { continue } -# $modules += $dependency -# } -# else { -# if ($modules -contains $dependency.ModuleName) { continue } -# $modules += $dependency.ModuleName -# } -# } +$data = Import-PowerShellDataFile -Path "$PSScriptRoot\..\Hawk\Hawk.psd1" +foreach ($dependency in $data.RequiredModules) { + if ($dependency -is [string]) { + if ($modules -contains $dependency) { continue } + $modules += $dependency + } + else { + if ($modules -contains $dependency.ModuleName) { continue } + $modules += $dependency.ModuleName + } +} foreach ($module in $modules) { # Write-Output "Installing module: $module"