When reopening my workspace in a devcontainer, these environment variables fail to be interpolated and cause the devcontainer to fail to open. This is not an issue that I encounter when using vscode.
I have confirmed that I am able to echo these env vars in the cursor terminal immediately before rebuilding/reopening in devcontainer. $HOME seems to work fine, but variables exported from .bashrc do not work (they DO work with vscode)
Hey, thanks for the report. I see it’s the same issue we fixed before, so this looks like a regression.
Can you check which version of the Anysphere Remote SSH extension you have installed? (Extensions panel > search for “Remote SSH” > check the version). Last time, the fix landed in v1.0.44.
If you’re on the latest version and it still reproduces, I’ll pass it to the team as a regression.
As a temporary workaround, you can hardcode the paths instead of using ${localEnv:MOUNT_SOURCE}, or export the variables from ~/.zshenv or /etc/environment (these files are read for non-interactive shells).
Hey, sorry for the delay. Confirmed, it’s in v1.0.46 and it reproduces, so this is a regression from the v1.0.44 fix. I’ve already passed this to the team.
Describe the Bug
If I use set the workspaceFolder property in any devcontainer using a variable, the string doesn’t resolve. Pre-launch validation also fails, because it require the string to be absolute start with a /. Isn’t support for this part of the spec?
Steps to Reproduce
How can you reproduce this bug? We have a much better chance at fixing issues if we can reproduce them!
Create a devcontainer.json file in .devcontainer/
Use a variable in the workspaceFolder property
{
“workspaceFolder”: “${localEnv.WORKSPACE_FOLDER}”,
//…
Reopen window in devcontainer
Expected Behavior
The variable will be resolved to the variable value in configured .env
Screenshots / Screen Recordings
If applicable, attach images or videos (.jpg, .png, .gif, .mp4, .mov)
Failed to reopen folder in container: [UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character
For AI issues: which model did you use?
Model name (e.g., Sonnet 4, Tab…)
N/A
For AI issues: add Request ID with privacy disabled
Request ID: f9a7046a-279b-47e5-ab48-6e8dc12daba1
For Background Agent issues, also post the ID: bc-…
N/A
Additional Information
Add any other context about the problem here.