Skip to content

Small typo in archive cmdlets tests#3121

Merged
daxian-dbw merged 2 commits into
PowerShell:masterfrom
iSazonov:typo-in-arch-tests
Feb 10, 2017
Merged

Small typo in archive cmdlets tests#3121
daxian-dbw merged 2 commits into
PowerShell:masterfrom
iSazonov:typo-in-arch-tests

Conversation

@iSazonov
Copy link
Copy Markdown
Collaborator

@iSazonov iSazonov commented Feb 9, 2017

Extra point in the module name.
Moreover, there is no need to check that the module is loaded

@PowerShellTeam PowerShellTeam added the Review - Needed The PR is being reviewed label Feb 9, 2017
if ( Get-Module Microsoft.PowerShell.Archive. ) {
Remove-Module Microsoft.PowerShell.Archive -force
}
Remove-Module Microsoft.PowerShell.Archive -force
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The Get-Module call is to avoid getting the error message Remove-Module : No modules were removed. Verify that the specification of modules to remove is correct and those modules exist in the runspace. because Archive module is only loaded when it's used.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Alternatively, you can just add -erroraction silentlycontinue at the end

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks! Fixed.

@daxian-dbw daxian-dbw self-assigned this Feb 9, 2017
@daxian-dbw daxian-dbw added Review - Waiting on Author and removed Review - Needed The PR is being reviewed labels Feb 9, 2017
@PowerShellTeam PowerShellTeam added Review - Needed The PR is being reviewed and removed Review - Waiting on Author labels Feb 9, 2017
@SteveL-MSFT
Copy link
Copy Markdown
Member

LGTM

@daxian-dbw daxian-dbw merged commit aa764dd into PowerShell:master Feb 10, 2017
@iSazonov iSazonov deleted the typo-in-arch-tests branch February 16, 2017 03:43
@iSazonov iSazonov removed the Review - Needed The PR is being reviewed label Mar 27, 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