robotcodedev / robotcode

RobotFramework support for Visual Studio Code
https://robotcode.io
Apache License 2.0
186 stars 15 forks source link

[BUG] .robot.toml is overriding all profiles configurations #304

Closed Leemur89 closed 2 months ago

Leemur89 commented 2 months ago

Describe the bug hello, .robot.toml is overriding all profiles configuration, not only the one in it

To Reproduce In robot.toml:

[profiles.ci]
description = "CI pipelines"
enabled = { if = "environ.get('CI') == 'true'" }

In .robot.toml:

[profiles.local.extend-env]
MY_VAR = "some value that I regularly change"

Then when I use the profile "ci", it is not found anymore:

$ robotcode -p ci profiles list
[ ERROR ] Can't find any configuration profiles matching the pattern 'ci'.

  Active   Selected   Enabled   Precedence   Name    Description  
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                                                          local              

Expected behavior toml files are merged: profiles (both sections and subsections) that are in the robot.toml but not in .robot.toml should be kept

Desktop (please complete the following information):

d-biehl commented 2 months ago

if you want to have local profiles in .robot.toml and don't want to override existing profiles you have to use extend-profiles in .robot.toml

example:

[extend-profiles.local.extend-env]
MY_VAR = "some value that I regularly change"

In the next days I hopefully have the time to publish the new robotcode website ;-)

Leemur89 commented 2 months ago

oooh, did not see that one, thanks!