Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ function Start-PSPester {
[string]$Directory = "$PSScriptRoot/test/powershell"
)

& (Get-PSOutput) -noprofile -c "Import-Module '$PSScriptRoot/src/Modules/Pester'; Invoke-Pester $Flags $Directory/$Tests"
& (Get-PSOutput) -noprofile -c "Invoke-Pester $Flags $Directory/$Tests"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?
I added this because the Win10 version was getting imported on my Win10 dev machine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved Pester into src/Modules/Shared, so this call fails as-is. We copy pester into the output, we should import it from there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import-Module : The specified module 
'/home/travis/build/PowerShell/PowerShell/src/Modules/Pester' was not loaded 
because no valid module file was found in any module directory.
At line:1 char:1
+ Import-Module '/home/travis/build/PowerShell/PowerShell/src/Modules/P ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (/home/travis/bu.../Modules 
   /Pester:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Comm 
   ands.ImportModuleCommand

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Travis currently.

if ($LASTEXITCODE -ne 0) {
throw "$LASTEXITCODE Pester tests failed"
}
Expand Down Expand Up @@ -1757,4 +1757,4 @@ $script:RESX_TEMPLATE = @'
</resheader>
{0}
</root>
'@
'@