From 2d3cc439845c1ce01ef9b7210cf07e0390a19c77 Mon Sep 17 00:00:00 2001 From: Konrad du Plessis Date: Fri, 12 Jun 2026 19:03:09 +0200 Subject: [PATCH] fix: run_dev.bat works from any launch directory (cd to its own folder first) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bat assumed it was started from the repo root — python couldn't find manage.py when the Claude preview runner (or any other launcher) started it from elsewhere. cd /d "%~dp0" pins it to the script's own directory. .claude/launch.json (gitignored) now also passes the bat's absolute path so cmd finds it regardless of working directory. Co-Authored-By: Claude Fable 5 --- run_dev.bat | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/run_dev.bat b/run_dev.bat index 8b984df..2ee4825 100644 --- a/run_dev.bat +++ b/run_dev.bat @@ -1,5 +1,9 @@ @echo off REM === Local dev launcher === +REM cd to this script's own folder first (%~dp0 = the .bat's directory) so +REM "python manage.py ..." works no matter where the launcher was started +REM from (the Claude preview runner starts cmd outside the project root). +cd /d "%~dp0" REM USE_SQLITE=true -> use SQLite, skip MySQL requirement, relax prod-only checks REM DJANGO_DEBUG=true -> make Django's dev server auto-serve /static/ files so REM CSS/JS/images load without needing collectstatic (prod