Skip to content

HostWorkingDir and position-aware default scope #59

Description

@UltraBob

Enable HostWorkingDir: true on all commands and implement position-aware default scope. Ordering matters: fix COMMANDS_DIR before enabling HostWorkingDir.

Work items (order-sensitive)

  1. Fix COMMANDS_DIR in checks and checks-full first — currently ./.ddev/commands/web/<tool>, fails from non-root dirs
  2. Re-anchor all default scopes to $DDEV_APPROOT and dcq-reports/ to project root
  3. Add HostWorkingDir: true to every command
  4. Position-aware defaults: at project root with no args → scan custom dirs; elsewhere → scan cwd
  5. Gate default path injection on no positional paths AND not stdin mode
  6. Port host-working-dir.bats; add stdin-gating tests

Acceptance criteria

  • COMMANDS_DIR fixed before HostWorkingDir is enabled
  • All default scopes anchored to $DDEV_APPROOT
  • HostWorkingDir: true on every command
  • Position-aware defaults: root → custom dirs, non-root → cwd
  • --stdin-path does not trigger default scope injection
  • Tests pass

Blocked by: ADRs for position-aware defaults and working directory (PRs pending)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreBehaviour shared by both modes

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions