You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] just check uses wrong path — justfile_directory() resolves incorrectly in imported justfile.base #187
The check recipe in justfile.base uses dirname "{{justfile_directory()}}" to locate .devcontainer/scripts/version-check.sh. This path computation is wrong in both contexts where justfile.base is used:
Deployed workspace:justfile_directory() returns the project root (where the root justfile lives). dirname of that goes one level above the project, producing a path like /workspace/.devcontainer/scripts instead of /workspace/<project>/.devcontainer/scripts.
Devcontainer repo: Same logic produces <parent-of-repo>/.devcontainer/scripts, which also doesn't exist.
Steps to Reproduce
Open a deployed workspace container
Run just check
Expected Behavior
just check locates .devcontainer/scripts/version-check.sh and runs the version check.
Actual Behavior
Error: Could not locate .devcontainer/scripts directory
Environment
All deployed workspaces using justfile.base
Also fails in the devcontainer repo itself
Additional Context
justfile.gh already uses the correct pattern:
_gh_scripts := source_directory() / "scripts"
source_directory() (available since just 1.27.0) returns the directory of the current source file, not the root justfile. The container installs the latest just release, which is well past 1.27.0.
Possible Solution
Replace line 76 in justfile.base:
# Before (broken):
SCRIPT_DIR="$(cd "$(dirname "{{justfile_directory()}}")/.devcontainer/scripts"&& pwd)"# After (fixed):
SCRIPT_DIR="$(cd "{{source_directory()}}/scripts"&& pwd)"
This works correctly in both contexts:
Deployed workspace:source_directory() = .devcontainer/ → scripts/ is right there
Devcontainer repo:source_directory() = repo root → fails cleanly with "version-check.sh not found" (expected, since the script only exists in deployed workspaces)
Problem: The check recipe uses dirname(justfile_directory()) to locate .devcontainer/scripts/. In both contexts (deployed workspace and devcontainer repo), this resolves one level above the project root, producing invalid paths.
Solution: Use source_directory() (available since just 1.27.0) — returns the directory of the current source file, not the root justfile. This matches the pattern already used in justfile.gh (_gh_scripts := source_directory() / "scripts").
Replace dirname(justfile_directory()) with source_directory() in check recipe — justfile.base — verify: just sync-workspace runs; integration test for just check passes
Activity
gerchowl commentedon Feb 24, 2026
Design
Problem: The
checkrecipe usesdirname(justfile_directory())to locate.devcontainer/scripts/. In both contexts (deployed workspace and devcontainer repo), this resolves one level above the project root, producing invalid paths.Solution: Use
source_directory()(available since just 1.27.0) — returns the directory of the current source file, not the root justfile. This matches the pattern already used injustfile.gh(_gh_scripts := source_directory() / "scripts").Change: Replace line 76 in
justfile.base:SCRIPT_DIR="$(cd \"$(dirname \"{{justfile_directory()}}\")/.devcontainer/scripts\" && pwd)"SCRIPT_DIR="$(cd \"{{source_directory()}}/scripts\" && pwd)"Context behavior:
source_directory()=.devcontainer/→scripts/resolves correctly.source_directory()= repo root →scripts/=repo/scripts; version-check.sh not present (expected) → fails cleanly with "version-check.sh not found".Files:
justfile.base(canonical);assets/workspace/.devcontainer/justfile.baseis synced via manifest from root.Testing: Existing integration tests that run
just checkin initialized workspaces will verify the fix.gerchowl commentedon Feb 24, 2026
Implementation Plan
Issue: #187
Branch: bugfix/187-fix-just-check-path
Tasks
dirname(justfile_directory())withsource_directory()in check recipe —justfile.base— verify:just sync-workspaceruns; integration test forjust checkpassestest: add regression test for just check path resolution
fix(justfile): use source_directory() for check recipe path resolution
docs(changelog): add entry for just check path fix
gerchowl commentedon Feb 24, 2026
Autonomous Run Complete
fix: just check uses wrong path (#187) (#189)