Skip to content
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

(GH-442) add conditional to prevent removal of unloaded modules #443

Closed
wants to merge 1 commit into from

Conversation

rismoney
Copy link
Contributor

@rismoney rismoney commented Oct 2, 2015

this is part of a cleaning up content that might be contained
within stderr.

Closes #442

…ules

this is part of a cleaning up content that might be contained
within stderr.
@@ -7,7 +7,9 @@ $modules = Get-ChildItem $toolsPath -Filter *.psm1
$modules | ForEach-Object {
$psm1File = $_.FullName;
$moduleName = $([System.IO.Path]::GetFileNameWithoutExtension($psm1File))
remove-module $moduleName -ErrorAction SilentlyContinue;
if (Get-Module $moduleName) {
Copy link
Member

Choose a reason for hiding this comment

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

Am I misunderstanding in that this will actually fail if there is no module?

Copy link
Member

Choose a reason for hiding this comment

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

Actually it looks like it should not error, but is it truthy?

Copy link
Member

Choose a reason for hiding this comment

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

This is done twice I believe.

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I mean this is done more times down in the actual module as well.

@ferventcoder
Copy link
Member

Merged into stable at 8840209

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.

2 participants