devcontainers / devcontainers/spec

variable to get the current folder name

Open
#736 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
5.7k
Forks
496
PR merge metrics
No merged PRs in 30d

Description

Hi,

Is there a way or variable to get the folder name of the running devcontainer.json (after selecting "Reopen in Container" in VSCode)?

My setup is:
```
repo
.devcontainer/
container1/
devcontainer.json
container2/
devcontainer.json
```
I need to obtain "container1" or "container2" depending on which devcontainer.json is active/selected.

Note: ${localWorkspaceFolderBasename} returns only the main repository folder name, and ${localWorkspaceFolder} returns the full path up to the main repo folder, so neither reflects the devcontainer subfolder.

Thanks a lot!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.