Skip to content

Fix isLocalFolder() to allow symlinks to directories#1214

Open
reyjrar wants to merge 2 commits intodevcontainers:mainfrom
reyjrar:allow-symlink-local-features
Open

Fix isLocalFolder() to allow symlinks to directories#1214
reyjrar wants to merge 2 commits intodevcontainers:mainfrom
reyjrar:allow-symlink-local-features

Conversation

@reyjrar
Copy link
Copy Markdown

@reyjrar reyjrar commented Apr 28, 2026

I'm trying to layer in a local feature for my developers to apply custom preferences to their devcontainers without polluting eachother's devcontainers.

I want to use a symlink from ~/.devcontainer/personal-config to the local repository's .devcontainer/personal-config and add:

{
    ...
    "features": {
        "./personal-config": {}
    }
}

To the local repository's .devcontainer/devcontainer.json. Unfortunately, the current isLocalFolder() chokes on symlinks. This patch should allow symlinked directories for local features.

I'm not a TypeScript programmer, and I'm not sure this is the exact implementation.

I'm trying to layer in a local feature for my developers to apply custom
preferences to their devcontainers without polluting eachother's
devcontainers.

I want to use a symlink from `~/.devcontainer/personal-config` to the
local repository's `.devcontainer/personal-config` and add:

```
{
    ...
    "features": {
        "./personal-config": {}
    }
}
```

To the local repository's `.devcontainer/devcontainer.json`.
Unfortunately, the current `isLocalFolder()` chokes on symlinks. This
patch should allow symlinked directories for local features.

I'm not a TypeScript programmer, and I'm not sure this is the exact
implementation. I'm not a fan of async programming, especially for
command line utilities with linear workflows, but the world lost it's
mind and uses callback non-sense for straight forward problems, so here
we are.
@reyjrar reyjrar requested a review from a team as a code owner April 28, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant