PowerShell / SecretManagement

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

Register-SecretVault should import a module with -Force #38

Closed TylerLeonhardt closed 4 years ago

TylerLeonhardt commented 4 years ago

I'm working on crafting an extension and what's kinda annoying is having to create a new PowerShell session every time I make a change to my implmenting script extension.

I wish I could just run this:

Unregister-SecretVault -Name foo
Register-SecretVault -Name foo -ModuleName .

And be ready to go with out a restart of my PowerShell session.

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.91. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

PaulHigin commented 4 years ago

I think adding a -Force to replace an existing secret vault module is a good idea. However, if your vault module is binary based you will need to restart your PowerShell session. This is just PowerShell/.NET and has nothing to do with SecretManagement.

TylerLeonhardt commented 4 years ago

I know it's a PowerShell/.NET behavior and you can't do anything for binary modules but it would certainly make the dev experience better :) plus I think we'll see a bunch of script extensions which wrap CLIs so this would help with all of those.

SydneyhSmith commented 4 years ago

Thanks everyone we made the decision to use the -AllowClobber switch rather than -Force

PaulHigin commented 4 years ago

Added -Force for import. Also added ability to overwrite existing vault. Preview4.