When is ~/.vscode-remote/bin available? #132202
Replies: 4 comments 4 replies
-
@rubensa
For seamless setup, add extensions in the |
Beta Was this translation helpful? Give feedback.
-
It seems like you're facing a timing issue where the ~/.vscode-remote/bin folder isn't available when the onCreateCommand is executed in your Codespaces environment. Here are a few strategies to work around this problem: Delay Execution: Bash code: |
Beta Was this translation helpful? Give feedback.
-
Doing some test, looks like So the command would be ~/.vscode-remote/bin/*/bin/remote-cli/code --install-extension ${extension} --force but, again, this is not available by the time onCreateCommand is run in Codespaces. @54J4N Thanks for your help. The thing is that the extensions to be installed, in my case, comes from two independent files (config outside devcontainer.json). I suppose I need to use postAttachCommand here, checking if extensions are already installed before trying to install them again (but it would be great if this would work as inside VSCode devcontainers where the command is already available by the time when onCreateCommand is executed). Do you know if there is more detailed info about execution order other than Understanding the codespace lifecycle? @ChandruMuthuswamy Thanks for you suggestion but, as @54J4N suggest, looks like the ~/.vscode-remote/bin folder might be created in other Codespaces lifecycle as the wait loop keeps running for ever. |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
I have some code in onCreateCommand to automatically install some VSCode extensions using
code-server
command.This is working in VSCode using the
~/.vscode-server/bin/*/bin/code-server --install-extension ${extension} --force
command and I think that, at some point, it was also available in Codespaces.Now, it looks like in Codespaces, the command would be
~/.vscode-remote/bin/*/bin/code-server --install-extension ${extension} --force
but, at the time onCreateCommand is executed, looks like ~/.vscode-remote/bin folder is not available. I can see only ~/.vscode-remote/data folder, despite when the container is fully initialized, the ~/.vscode-remote/bin folder is also there.Beta Was this translation helpful? Give feedback.
All reactions