Skip to content

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

@brwilkinson

Description

@brwilkinson

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions