PowerShell / SecretStore

MIT License
156 stars 23 forks source link

Reset-SecretStoreConfiguration confirmation prompt #16

Closed ThomasNieto closed 3 years ago

ThomasNieto commented 4 years ago

Can the confirmation prompt default to "N" instead of (default is "Y")? The last thing I would want to have happen is accidentally pressing enter and now all the configuration is reset.

PS C:\> Reset-SecretStore
WARNING: !!This operation will completely remove all SecretStore module secrets and reset configuration settings to default values!!

Confirm
Are you sure you want to perform this action?
Performing the operation "Erase all secrets in the local store and reset the configuration settings to default values" on target "SecretStore module local store".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):

      Scope PasswordRequired PasswordTimeout DoNotPrompt
      ----- ---------------- --------------- -----------
CurrentUser             True             900       False
PaulHigin commented 4 years ago

Yes, I will definitely change this.

PaulHigin commented 4 years ago

Actually, I am not sure if this can be changed as it is built-in to PowerShell's cmdlet ShouldProcess(). Will need to look into it.

ThomasNieto commented 3 years ago

The overload for ShouldContinue that contains a parameter hasSecurityImpact that will set the default to N. Here is an issue that @mklement0 opened to add a new overload that removes the need for yes to all or no to all. https://github.com/PowerShell/PowerShell/issues/9428

PaulHigin commented 3 years ago

Fixed preview2.