cli icon indicating copy to clipboard operation
cli copied to clipboard

Fix: Honor COMPOSE_PROFILE environment variable

Open varkrish opened this issue 6 months ago • 2 comments

This commit addresses an issue where the devcontainer exec command would always override the COMPOSE_PROFILE environment variable by defaulting to --profile * when reading the Docker Compose configuration.

The readDockerComposeConfig function in src/spec-node/dockerCompose.ts has been updated to check for the presence of the COMPOSE_PROFILE environment variable. If COMPOSE_PROFILE is set, the --profile * argument will not be added, allowing users to specify their desired profiles through the environment variable.

Additionally, new tests have been added to src/test/dockerComposeUtils.test.ts to verify this behavior.

varkrish avatar Jul 01 '25 02:07 varkrish