-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow cross-platform/per system initializeCommand definition #347
Comments
Potentially indeed - assuming "features"/"things" include |
This is indeed something required because depending on the host OS, different commands are needed to prepare the container to run. In my case, I want to mount the // It seems that if the .npmrc file is not present, then the container can't
// be open. To not force, contributor to have an NPM account,
// we create a dummy .npmrc file if it doesn't exist
"initializeCommand": "if [ ! -f ~/.npmrc ]; then touch ~/.npmrc; fi",
"mounts": [
// Mount .npmrc from the host machine, to be able to use the host session
// This allow the user to login on their own machine once and not each time
// they build a new devcontainer
"source=${localEnv:HOME}${localEnv:USERPROFILE}/. ,target=/home/vscode/.npmrc,type=bind,consistency=cached"
], I need to support both scenario to make my life easier as a maintainer but also not force contributor to have an NPM account. |
Being able to set up OS-specific InitializeCommand is definitely something I need as well. Is there a way to choose the shell for executing InitializeCommand? It seems that on Mac, it runs with bash, while on Windows, it runs with PowerShell. |
Steve Bombardier
Le ven. 28 juin 2024, 14 h 37, Maryam.to ***@***.***> a
écrit :
… Being able to set up OS-specific InitializeCommand is definitely something
I need as well.
Is there a way to choose the shell for executing InitializeCommand? It
seems that on Mac, it runs with bash, while on Windows, it runs with
PowerShell.
—
Reply to this email directly, view it on GitHub
<#347 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A7XISKS6HUR7TWPT7PVN45DZJWUNNAVCNFSM6AAAAABAFPEFIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJXGQ2DEOBUGM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Not sure if it's the most proper repo to report this (if not, please redirect), but would be nice if there was a way to define
initializeCommand
per system in any way, so that the setup is truly cross-system. For example:Use case example: https://stackoverflow.com/questions/77199011/how-to-create-a-cross-platform-initializecommand-for-visual-studio-codes-dev-co (copying proper .env file before container launch).
The text was updated successfully, but these errors were encountered: