Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 1.66 KB

File metadata and controls

40 lines (31 loc) · 1.66 KB

← Back to Backlog

[BUG-002] ✅ DONE - VS Code WSL Interop Interference Fixed

Status: Done (2026-02-03) Priority: High Component: tools/pslib/wsl/scripts/install-docker.sh, tools/pslib/wsl/lib/docker.ps1

Problem: VS Code's WSL server could overwrite Docker's rc.local-based Windows executable interop configuration, breaking Docker commands and .exe execution.

Solution Implemented: Replaced rc.local with kernel-level /etc/binfmt.d/WSLInterop.conf configuration managed by systemd-binfmt.service. This is a core system service that loads before VS Code and cannot be overridden.

Implementation:

  • ✅ Modified install-docker.sh to use binfmt.d instead of rc.local
  • ✅ Added automatic migration from old rc.local configuration
  • ✅ Made Docker installation fully idempotent (safe to re-run for repair)
  • ✅ Updated integration tests to verify binfmt.d configuration
  • ✅ Removed separate "Fix interop" menu option (now part of idempotent Docker setup)
  • ✅ All unit tests + integration tests passing

Repair/Verification: Users can verify or repair their Docker installation by simply re-running:

wsl-manager setup-docker <distro-name>

The idempotent Docker setup will:

  • Detect if binfmt.d is already configured (skip if present)
  • Migrate from old rc.local to binfmt.d if needed
  • Verify all components are working correctly

Files Modified:

  • tools/pslib/wsl/scripts/install-docker.sh - binfmt.d implementation
  • tools/pslib/wsl/lib/docker.ps1 - idempotent wrapper
  • tools/pslib/wsl/wsl-manager.ps1 - simplified menu
  • Integration tests - binfmt.d verification

← Back to Backlog