Fix isLocalFolder() to allow symlinks to directories#1214
Open
reyjrar wants to merge 2 commits intodevcontainers:mainfrom
Open
Fix isLocalFolder() to allow symlinks to directories#1214reyjrar wants to merge 2 commits intodevcontainers:mainfrom
reyjrar wants to merge 2 commits intodevcontainers:mainfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-configto the local repository's.devcontainer/personal-configand add:To the local repository's
.devcontainer/devcontainer.json. Unfortunately, the currentisLocalFolder()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.