Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do we need to store the ModulePath in the vaultinfo file? #106

Open
3 tasks done
brwilkinson opened this issue Aug 2, 2024 · 1 comment
Open
3 tasks done

Do we need to store the ModulePath in the vaultinfo file? #106

brwilkinson opened this issue Aug 2, 2024 · 1 comment

Comments

@brwilkinson
Copy link

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.

Steps to reproduce

cat $env:LOCALAPPDATA\Microsoft\PowerShell\secretmanagement\secretvaultregistry\vaultinfo

Do we have to store the ModulePath in the metadata file?

{
  "Vaults": {
    "SS": {
      "ModuleName": "Microsoft.PowerShell.SecretStore",
      "Description": "",
      "ModulePath": "C:\\Users\\myuser\\Documents\\PowerShell\\Modules\\Microsoft.PowerShell.SecretStore",
      "VaultParameters": {},
      "SetSecretSupportsMetadata": true
    }
  },
  "DefaultVaultName": "SS"
}
"ModulePath": "C:\\Users\\myuser\\OneDrive - Blah\\Documents\\PowerShell\\Modules\\Microsoft.PowerShell.SecretStore",

Expected behavior

I recently migrated from using documents in $home to documents in $env:OneDrive

then had to spend a bunch of time fixing the issue by unregistering and reregistering the secretvault.

Does the path really need to be in there?

Actual behavior

errors pointing to the old path that did not exist after the documents directory and modules directory was moved.

Error details

No response

Environment data

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.4.4
PSEdition                      Core

Version

1.1.2

Visuals

No response

@brwilkinson
Copy link
Author

This could also occur if you switched module path from user to machine.

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

No branches or pull requests

1 participant