Skip to content

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

Merged
merged 2 commits into from
Oct 26, 2017

Conversation

SteveL-MSFT
Copy link
Member

missing break after module was loaded successfully so loop continues
but module isn't "found" and thus reports error even though loaded

Fix #5232

missing break after module was loaded successfully so loop continues
but module isn't "found" and thus reports error even though loaded
fix older test
@@ -27,6 +39,11 @@
{ $script:module = Import-Module $moduleName -PassThru } | Should Not Throw
Copy link
Collaborator

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Will add

@daxian-dbw
Copy link
Member

Shall we add the '[Feature]' tag to run all tests?

@SteveL-MSFT
Copy link
Member Author

@daxian-dbw it wouldn't hurt to run [feature] tests, will update

Copy link
Contributor

@PaulHigin PaulHigin left a comment

Choose a reason for hiding this comment

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

LGTM

@SteveL-MSFT
Copy link
Member Author

@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?

@daxian-dbw
Copy link
Member

daxian-dbw commented Oct 25, 2017

@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.

@SteveL-MSFT
Copy link
Member Author

@daxian-dbw thanks, I guess we'll just wait for that to merged then I'll restart the macOS job

@adityapatwardhan
Copy link
Member

@SteveL-MSFT restarted the Travis-CI macOS job. The homebrew PR is merged.

@SteveL-MSFT
Copy link
Member Author

@JamesWTruher can you re-review?

@daxian-dbw daxian-dbw merged commit 967ed8b into PowerShell:master Oct 26, 2017
@SteveL-MSFT SteveL-MSFT deleted the import-module branch October 26, 2017 22:35
matt9ucci added a commit to matt9ucci/PSProfiles that referenced this pull request Nov 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants