-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Update Start-PSPester #1275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Start-PSPester #1275
Conversation
Remove direct import call, since we are leveraging auto-discovery for Pester module
| ) | ||
|
|
||
| & (Get-PSOutput) -noprofile -c "Import-Module '$PSScriptRoot/src/Modules/Pester'; Invoke-Pester $Flags $Directory/$Tests" | ||
| & (Get-PSOutput) -noprofile -c "Invoke-Pester $Flags $Directory/$Tests" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Travis currently.
|
Per offline discussion with @lzybkr new proposition:
|
@JamesWTruher we need to try the upstream package again. I know it makes some specific Windows calls, but we could potentially get PowerShell to respond with mock data or something to enable this kind of compatibility. |
Remove direct import call, since we are leveraging auto-discovery for Pester module