-
Notifications
You must be signed in to change notification settings - Fork 7.6k
import-module incorrectly reporting a loaded module was not found #5238
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
Conversation
missing break after module was loaded successfully so loop continues but module isn't "found" and thus reports error even though loaded
@@ -27,6 +39,11 @@ | |||
{ $script:module = Import-Module $moduleName -PassThru } | Should Not Throw |
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.
Please add -ErrorAction Stop
as a failed load is not a terminating error
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.
Will add
Shall we add the '[Feature]' tag to run all tests? |
@daxian-dbw it wouldn't hurt to run [feature] tests, will update |
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.
LGTM
@daxian-dbw looks like for mac Travis-CI installed beta.8, but the scripts tried to start pwsh. Did we publish beta.9 to homebrew already? |
@SteveL-MSFT The PR to update powershell.beta.9 in homebrew is here: Homebrew/homebrew-cask#40043 @adityapatwardhan submitted the PR early this morning, but it hasn't been merged yet. |
@daxian-dbw thanks, I guess we'll just wait for that to merged then I'll restart the macOS job |
@SteveL-MSFT restarted the Travis-CI macOS job. The homebrew PR is merged. |
@JamesWTruher can you re-review? |
missing break after module was loaded successfully so loop continues
but module isn't "found" and thus reports error even though loaded
Fix #5232