Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/spec-configuration/containerFeaturesConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,9 @@ export function getFeatureLayers(featuresConfig: FeaturesConfig) {
result += `

RUN cd /tmp/build-features/${feature.consecutiveId} \\
&& export $(cat devcontainer-features.env | xargs) \\
&& set -a \\
&& . ./devcontainer-features.env \\
Comment thread
joshspicer marked this conversation as resolved.
&& set +a \\
&& chmod +x ./install.sh \\
&& ./install.sh

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
},
"features": {
"./local-features/localFeatureA": {
"greeting": "buongiorno"
"greeting": "Hello there",
"punctuation": "!!!!"
},
"./local-features/localFeatureB": {
"favorite": "gold"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
echo "Activating feature 'localFeatureA'"

GREETING=${GREETING:-undefined}
PUNCTUATION=${PUNCTUATION:-?????}
echo "The provided greeting is: $GREETING"

tee /usr/hello.sh > /dev/null \
<< EOF
#!/bin/bash
RED='\033[0;91m'
NC='\033[0m' # No Color
echo -e -n "\${RED}${GREETING}, \$(whoami)!"
echo -e -n "\${RED}${GREETING}, \$(whoami)${PUNCTUATION}"
echo -e -n "\${NC}"
EOF

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
},
"features": {
"./local-features/localFeatureA": {
"greeting": "buongiorno"
"greeting": "Hello there",
"punctuation": "!!!!"
},
"./local-features/localFeatureB": {
"favorite": "gold"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
echo "Activating feature 'localFeatureA'"

GREETING=${GREETING:-undefined}
PUNCTUATION=${PUNCTUATION:-?????}
echo "The provided greeting is: $GREETING"

tee /usr/hello.sh > /dev/null \
<< EOF
#!/bin/bash
RED='\033[0;91m'
NC='\033[0m' # No Color
echo -e -n "\${RED}${GREETING}, \$(whoami)!"
echo -e -n "\${RED}${GREETING}, \$(whoami)${PUNCTUATION}"
echo -e -n "\${NC}"
EOF

Expand Down
4 changes: 2 additions & 2 deletions src/test/container-features/e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ describe('Dev Container Features E2E (local-path)', function () {
const response = JSON.parse(res.stdout);
console.log(res.stderr);
assert.equal(response.outcome, 'success');
assert.match(res.stderr, /buongiorno, root!/);
assert.match(res.stderr, /Hello there, root!!!!/);
});

it('should read configuration with features', async () => {
Expand Down Expand Up @@ -201,7 +201,7 @@ describe('Dev Container Features E2E (local-path)', function () {
const response = JSON.parse(res.stdout);
console.log(res.stderr);
assert.equal(response.outcome, 'success');
assert.match(res.stderr, /buongiorno, root!/);
assert.match(res.stderr, /Hello there, root!!!!/);
});

it('should read configuration with features with customizations', async () => {
Expand Down