fix(read-configuration): accept --config alone (#66)#77
Merged
Conversation
The upstream @devcontainers/cli treats --config and --workspace-folder
as independently optional and does not require a workspace selector
when an explicit config path is provided. Deacon rejected
`read-configuration --config <path>` invocations on the assumption
that one of --container-id/--id-label/--workspace-folder was always
mandatory; that gate is a deacon-specific divergence.
Add --config to the accepted selector list. When --config is supplied
alone (no --workspace-folder), default the workspace to the config
file's parent directory so ${localWorkspaceFolder} substitutions stay
meaningful — matching the reference CLI's effective behavior.
Tests:
- test_selector_requirement_with_only_config (positive case)
- test_selector_requirement_no_selectors_no_config (negative case
updated to the new error wording)
SPEC.md (read-configuration) updated to list --config as an accepted
selector and document the workspace fallback.
Closes #66.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
8d31d89 to
7b486d1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
read-configuration --config <path>no longer requires--workspace-folder,--container-id, or--id-label. Upstream@devcontainers/clitreats these as independently optional; deacon now matches.--configis supplied alone, the workspace defaults to the config file's parent directory so${localWorkspaceFolder}substitutions remain meaningful.--configalongside the existing selectors.Closes #66. Unblocks
doctor/gpu-host-requirementsandconfiguration/extends-chain-cycleexample scenarios per #74.Test plan
make test-nextest-fast(2090 passing)cargo fmt --all -- --check/cargo clippy --all-targets -- -D warningstest_selector_requirement_with_only_config— positive casetest_selector_requirement_no_selectors_no_config— negative case with updated wording🤖 Generated with Claude Code