Skip to content

Commit d652f57

Browse files
feat: support --verbose
1 parent 4a25570 commit d652f57

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed

src/code-server/devcontainer-feature.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@
100100
"default": "",
101101
"description": "File mode of the socket when using the socket option."
102102
},
103+
"verbose": {
104+
"type": "boolean",
105+
"default": false,
106+
"description": "Enable verbose logging."
107+
},
103108
"version": {
104109
"type": "string",
105110
"default": "",

src/code-server/install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ if [[ -n "$WELCOMETEXT" ]]; then
8787
FLAGS+=(--welcome-text "$WELCOMETEXT")
8888
fi
8989

90+
if [[ "$VERBOSE" == "true" ]]; then
91+
FLAGS+=(--verbose)
92+
fi
93+
9094
cat > /usr/local/bin/code-server-entrypoint <<EOF
9195
#!/usr/bin/env bash
9296
set -e
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# Optional: Import test library bundled with the devcontainer CLI
5+
source dev-container-features-test-lib
6+
7+
# Feature-specific tests
8+
check "code-server version" code-server --version
9+
check "code-server running" pgrep -f 'code-server/lib/node.*/code-server'
10+
check "code-server listening" lsof -i "@127.0.0.1:8080"
11+
12+
check "code-server verbose" grep '"--verbose"' < /usr/local/bin/code-server-entrypoint
13+
14+
# Report results
15+
reportResults

test/code-server/scenarios.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,5 +192,13 @@
192192
"welcomeText": "Some Welcome Text"
193193
}
194194
}
195+
},
196+
"code-server-verbose": {
197+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
198+
"features": {
199+
"code-server": {
200+
"verbose": true
201+
}
202+
}
195203
}
196204
}

0 commit comments

Comments
 (0)