cli
cli copied to clipboard
Fix: Honor COMPOSE_PROFILE environment variable
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.