Skip to content
This repository has been archived by the owner on Apr 28, 2018. It is now read-only.

ShouldContinue & ShouldProcess attribute missing in the Cmdlets #171

Open
DexterPOSH opened this issue Dec 21, 2016 · 7 comments
Open

ShouldContinue & ShouldProcess attribute missing in the Cmdlets #171

DexterPOSH opened this issue Dec 21, 2016 · 7 comments
Labels

Comments

@DexterPOSH
Copy link

Output of $PSVersionTable (from a powershell process):

Name                           Value
----                           -----
PSVersion                      5.1.14393.576
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.576
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Output of ipmo Docker; (module Docker).Version.ToString() (from a powershell process):

0.1.0.111

Steps to reproduce the issue:

  1. Get-Command -Module Docker -ParameterName WhatIf
  2. Get-Command -Module Docker -ParameterName Force ; Get-Command -Module Docker -ParameterName Confirm

What actually happened?:

Throws an error that no matching commands include a parameter named 'whatif' or 'confirm'

What did you expect to happen?:
As a best practice while developing cmdlets for PowerShell, it is recommended to Support ShouldProcess & ConfirmImpact cmdlet attributes.

Additional information:
Creating a Cmdlet that Modifies the System

@DexterPOSH
Copy link
Author

These should be pretty simple fix, let me know if this is up for grabs.

@swernli
Copy link
Contributor

swernli commented Dec 21, 2016

@DexterPOSH Thanks for the feedback. This is definitely up for grabs, and we'd be happy to have the contribution!

@swernli swernli added the bug label Dec 21, 2016
@DexterPOSH
Copy link
Author

@swernli awesome, I will get started on this then.

@DexterPOSH DexterPOSH changed the title ConfirmImpact & ShouldProcess attribute missing in the Cmdlets ShouldContinue & ShouldProcess attribute missing in the Cmdlets Jan 3, 2017
@DexterPOSH
Copy link
Author

@swernli started working on this, to begin with working on the Remove-* cmdlets from the module.
Also, I need your opinion on if I am going down the right approach here.
Please take a look on how this looks :- DexterPOSH@7f639f6

@swernli
Copy link
Contributor

swernli commented Jan 9, 2017

@DexterPOSH Sorry I haven't responded yet, still catching up after vacation. I should be able to take a look soon!

@swernli
Copy link
Contributor

swernli commented Jan 10, 2017

@DexterPOSH Finally got the chance to look over the changes, and the pattern looks good overall. I had a few minor comments that hopefully help. Thanks again for working on this contribution!

@DexterPOSH
Copy link
Author

@swernli Thanks for some very good feedback, I will resume the work and keep hitting you with more questions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants