PowerShell / SecretManagement

PowerShell module to consistent usage of secrets through different extension vaults
MIT License
328 stars 46 forks source link

The Register-SecretVault cmdlet violates PowerShell’s best-practice coding rules. #81

Closed wi-fr closed 3 years ago

wi-fr commented 3 years ago

When strict mode is on, the Register-SecretVault cmdlet -- even though it completes what it is supposed to do -- generates a terminating error (“The property 'Path' cannot be found on this object. Verify that the property exists.”). Firstly, I would expect the Microsoft.PowerShell.SecretStore cmdlets to respect PowerShell’s best-practice coding rules and, secondly, if an error occurs anyway, the error to be non-terminating.

Set-StrictMode -Version Latest
try{
  Register-SecretVault -Name ‘MSStore' -ModuleName 'Microsoft.PowerShell.SecretStore'
  Register-SecretVault -Name 'KPStore' -ModuleName 'SecretManagement.Keepass'
} catch { $_ }
issue-label-bot[bot] commented 3 years ago

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

SydneyhSmith commented 3 years ago

Thanks @wi-fr we have a fix ready so you dont see the error

PaulHigin commented 3 years ago

Fixed for 1.0 RC1 release.