Skip to content

fix(read-configuration): accept --config alone (#66)#77

Merged
pofallon merged 1 commit into
mainfrom
fix/66-read-config-workspace-gate
May 28, 2026
Merged

fix(read-configuration): accept --config alone (#66)#77
pofallon merged 1 commit into
mainfrom
fix/66-read-config-workspace-gate

Conversation

@pofallon
Copy link
Copy Markdown
Contributor

Summary

  • read-configuration --config <path> no longer requires --workspace-folder, --container-id, or --id-label. Upstream @devcontainers/cli treats these as independently optional; deacon now matches.
  • When --config is supplied alone, the workspace defaults to the config file's parent directory so ${localWorkspaceFolder} substitutions remain meaningful.
  • The missing-selector error message now lists --config alongside the existing selectors.

Closes #66. Unblocks doctor/gpu-host-requirements and configuration/extends-chain-cycle example scenarios per #74.

Test plan

  • make test-nextest-fast (2090 passing)
  • cargo fmt --all -- --check / cargo clippy --all-targets -- -D warnings
  • Tests:
    • test_selector_requirement_with_only_config — positive case
    • test_selector_requirement_no_selectors_no_config — negative case with updated wording

🤖 Generated with Claude Code

@github-actions github-actions Bot added the docs Documentation changes label May 28, 2026
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>
@pofallon pofallon force-pushed the fix/66-read-config-workspace-gate branch from 8d31d89 to 7b486d1 Compare May 28, 2026 10:22
@pofallon pofallon merged commit 32c5cdf into main May 28, 2026
10 checks passed
@pofallon pofallon deleted the fix/66-read-config-workspace-gate branch May 28, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

read-configuration gates on --workspace-folder when --config is provided

1 participant