Skip to content

Provide a ${this.__name__} variable (like ${this.__env__} but valid in all sections) #4531

Open
@nomis

Description

@nomis

What kind of issue is this?

  • Feature Request.

Configuration

PlatformIO Version (platformio --version): 6.1.6

Description of problem

As stated in #4480 (comment), I am using ${this.__env__} to get the environment name in a non-environment section that will later be extended by an environment. This is being rejected as invalid (but it works) so I need the suggested ${this.__name__} to insert the name of the section/environment when the value is being evaluated.

[a]
test_testing_command =
	script.sh
	${platformio.build_dir}/${this.__name__}/test
	${platformio.build_dir}/${this.__name__}/program

[env:b]
extends = a

Where ${this.__name__} is expected to evaluate to b when the test_testing_command is used (this works with ${this.__env__} on 6.1.5).

Metadata

Metadata

Assignees

No one assigned

    Labels

    configplatformio.ini

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions