1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00

db migrations - remove comments before parsing secrets (#4519)

This commit is contained in:
Thomas Rittson 2024-07-17 07:03:07 +10:00 committed by GitHub
parent ad9f48b7be
commit 59cbe3e428
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,7 +27,9 @@ if ($all -or $postgres -or $mysql -or $sqlite) {
if ($all -or $mssql) {
function Get-UserSecrets {
return dotnet user-secrets list --json --project ../src/Api | ConvertFrom-Json
# The dotnet cli command sometimes adds //BEGIN and //END comments to the output, Where-Object removes comments
# to ensure a valid json
return dotnet user-secrets list --json --project ../src/Api | Where-Object { $_ -notmatch "^//" } | ConvertFrom-Json
}
if ($selfhost) {