Skip to content

Exhaustive variable substitutions #93628

@KingOfDuck

Description

@KingOfDuck

I was finding that custom settings can be defined in the workspace configuration file, but variabels substitution seems to be not recursive. Ive created a task like this in task.json:

        {
            "label": "echo",
            "type": "shell",
            "command": "echo ${config:myvar}",
        }

and added this in .code-workspace file:


	"settings": {
        ...
		"myvar2":"123",
		"myvar1":"${config:myvar2}",
		"myvar":"${config:myvar1}",
        ...

and running it shows

NOTHING.

If I change the task command as

            "command": "echo ${config:myvar1}",

or

            "command": "echo ${config:myvar2}",

then it will correctlly show

123

Are there any way to solve this problem? Cause I wanna make complex configurations for the project.

Metadata

Metadata

Assignees

Labels

*as-designedDescribed behavior is as designed*out-of-scopePosted issue is not in scope of VS Code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions