Skip to content

[Bug]: Settings broken ("*": null) after Update Al-Go System Files #2285

Description

@ChrisBlankDe

AL-Go version

9.0

Describe the issue

When the project definition just contains the schema link and Update AL-Go System Files is executed the resulting settings contains an unknowen element which breaks the other pipelines.
broken settings:

{
    "$schema":  "https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v9.0/.Modules/settings.schema.json",
    "*":  null
}

Expected behavior

settings should be valid after update al-go settings file

Steps to reproduce

create a project with empty settings file (just "$schema").
update al-go system files from an template which also adds no setting.

Additional context (logs, screenshots, etc.)

source of behaviour ist this line:

$dstSettings = $dstSettings | Select-Object @{ Name = '$schema'; Expression = { $_.'$schema' } }, * -ExcludeProperty '$schema'

Sample Code to validate:

'{ "$schema": "https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v9.0/.Modules/settings.schema.json"}' | convertfrom-json | Select-Object @{ Name = '$schema'; Expression = { $_.'$schema' } }, * -ExcludeProperty '$schema' | convertto-json

Result in pwsh:

{
  "$schema": "https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v9.0/.Modules/settings.schema.json"
}

Result in windows powershell:

{
    "$schema":  "https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v9.0/.Modules/settings.schema.json",
    "*":  null
}

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions