Skip to content

Commit 155ade7

Browse files
committed
Fix decoding JSON when running in nanoserver
1 parent a075ea8 commit 155ade7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

PhpManager/private/Get-PhpManagerConfigurationKey.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ Function Get-PhpManagerConfigurationKey
3131
If ($folder) {
3232
$path = Join-Path -Path $folder -ChildPath 'phpmanager.json'
3333
If (Test-Path -PathType Leaf -LiteralPath $path) {
34-
$json = Get-Content -LiteralPath $path | ConvertFrom-Json
34+
$content = @(Get-Content -LiteralPath $path) -join ''
35+
$json = ConvertFrom-Json -InputObject $content
3536
If ($json.PSobject.Properties.name -eq $Key) {
3637
$result = $json.$Key
3738
If ($null -ne $result) {

0 commit comments

Comments
 (0)