Skip to content

fix: just check uses wrong path (#187) - #189

Merged
gerchowl merged 4 commits into
devfrom
bugfix/187-fix-just-check-path
Feb 24, 2026
Merged

gerchowl merged 4 commits into
devfrom
bugfix/187-fix-just-check-path

Conversation

@gerchowl

Copy link
Copy Markdown
Contributor

Description

Fixes the just check recipe path resolution bug. The recipe used dirname(justfile_directory()) to locate .devcontainer/scripts/version-check.sh, which resolved one level above the project root in both deployed workspaces and the devcontainer repo. Replaced with source_directory()/scripts (matching the pattern in justfile.gh) so the path resolves correctly in both contexts.

Type of Change

  • feat -- New feature
  • fix -- Bug fix
  • docs -- Documentation only
  • chore -- Maintenance task (deps, config, etc.)
  • refactor -- Code restructuring (no behavior change)
  • test -- Adding or updating tests
  • ci -- CI/CD pipeline changes
  • build -- Build system or dependency changes
  • revert -- Reverts a previous commit
  • style -- Code style (formatting, whitespace)

Modifiers

  • Breaking change (!) -- This change breaks backward compatibility

Changes Made

  • justfile.base: Replace dirname(justfile_directory()) with source_directory()/scripts in check recipe
  • assets/workspace/.devcontainer/justfile.base: Synced via just sync-workspace
  • tests/test_integration.py: Add regression test test_just_check_config_via_just_command that runs just check config from workspace
  • CHANGELOG.md: Add entry under Fixed

Changelog Entry

Fixed

  • just check uses wrong path — justfile_directory() resolves incorrectly in imported justfile.base (#187)
    • Replace dirname(justfile_directory()) with source_directory()/scripts to correctly locate version-check.sh in deployed workspaces and devcontainer repo
    • Regression test: just check config runs successfully from workspace

Testing

  • Tests pass locally (just test)
  • Manual testing performed (describe below)

Manual Testing Details

Integration tests pass (110 passed). Regression test test_just_check_config_via_just_command verifies just check config runs successfully from initialized workspace. BATS and hadolint precommit hooks failed due to environment (bats-support library, Docker daemon) — unrelated to this fix.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly (edit docs/templates/, then run just docs)
  • I have updated CHANGELOG.md in the [Unreleased] section (and pasted the entry above)
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

TDD: regression test added first (RED), then fix (GREEN). The fix uses source_directory() (available since just 1.27.0), which returns the directory of the current source file — correct for imported justfile.base in both workspace and repo contexts.

Refs: #187

gerchowl and others added 3 commits February 24, 2026 17:43
Replace dirname(justfile_directory()) with source_directory()/scripts
to correctly locate version-check.sh in both deployed workspace and
devcontainer repo contexts. Matches justfile.gh pattern.

Refs: #187
Co-authored-by: Cursor <[email protected]>
@gerchowl
gerchowl merged commit fbe7eb8 into dev Feb 24, 2026
12 checks passed
@gerchowl
gerchowl deleted the bugfix/187-fix-just-check-path branch February 24, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant