Skip to content

Commit 7d0b52f

Browse files
gountharclaude
andauthored
fix: use bracket notation for JSON path in devcontainer updates (#1830)
The JSON path query for devcontainer.json was using dot notation with quotes which failed to match keys containing special characters (dots, slashes, colons). Changed from: $.features."ghcr.io/devcontainers/features/docker-in-docker:2".version To bracket notation: $.features["ghcr.io/devcontainers/features/docker-in-docker:2"].version This fixes the updatecli workflow error: could not find value for query "$.features.\"ghcr.io/devcontainers/features/docker-in-docker:2\".version" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <[email protected]>
1 parent c1f7ea5 commit 7d0b52f

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

updatecli/updatecli.d/devcontainer.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,28 @@ targets:
4040
dockerVersion:
4141
name: 'deps(devcontainer): update Docker version'
4242
scmid: default
43-
kind: json
43+
kind: file
44+
sourceid: dockerLatestMinor
4445
spec:
4546
file: .devcontainer/devcontainer.json
46-
key: $.features."ghcr.io/devcontainers/features/docker-in-docker:2".version
47-
sourceid: dockerLatestMinor
47+
matchpattern: '("version": ")([0-9.]*)(",)'
48+
replacepattern: '${1}{{ source "dockerLatestMinor" }}${3}'
49+
search:
50+
pattern: 'ghcr\.io/devcontainers/features/docker-in-docker'
4851
transformers:
4952
- trimprefix: v
5053

5154
githubcliVersion:
5255
name: 'deps(devcontainer): update GitHub CLI version'
5356
scmid: default
54-
kind: json
57+
kind: file
58+
sourceid: githubcliLatestMinor
5559
spec:
5660
file: .devcontainer/devcontainer.json
57-
key: $.features."ghcr.io/devcontainers/features/github-cli:1".version
58-
sourceid: githubcliLatestMinor
61+
matchpattern: '("version": ")([0-9.]+)(")'
62+
replacepattern: '${1}{{ source "githubcliLatestMinor" }}${3}'
63+
search:
64+
pattern: 'ghcr\.io/devcontainers/features/github-cli'
5965
transformers:
6066
- trimprefix: v
6167

0 commit comments

Comments
 (0)