From c39653a4585b00c85e418100aa7fab0ca2ca4cf3 Mon Sep 17 00:00:00 2001 From: Chuck <33324927+ChuckBuilds@users.noreply.github.com> Date: Thu, 17 Sep 2026 13:08:18 -0400 Subject: [PATCH] test(auto-update): make the seed script executable on disk, not only in the index On Linux Repo.publish() commits with -a, which recorded scripts/run.sh as 100644 upstream because the seed file was never chmod +x. The pull then brought in the same mode the installer chmod had made locally, so installer_chmod saw no mode change left to check. The updater was fine: with the upstream commit at 100755 the --autostash carries the device's chmod across. Verified under Linux (WSL, git 2.43): the old helper fails exactly as CI did, the fixed one passes all 63 tests in the file. Co-Authored-By: Claude Opus 5 --- test/test_auto_update.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/test_auto_update.py b/test/test_auto_update.py index 51efd500..7a1b7f40 100644 --- a/test/test_auto_update.py +++ b/test/test_auto_update.py @@ -349,6 +349,11 @@ def _device_with_plugin_and_script(tmp_path): ('scripts/run.sh', 'echo hi\n')): (repo.seed / rel).parent.mkdir(parents=True, exist_ok=True) (repo.seed / rel).write_text(text) + # Executable on disk too, not only in the index: Repo.publish() commits + # with -a, which on Linux would otherwise record run.sh as 100644 upstream + # and hide the device's own mode change behind the pull. + import os + os.chmod(repo.seed / 'scripts' / 'run.sh', 0o755) git(repo.seed, 'add', '.') git(repo.seed, 'update-index', '--chmod=+x', 'scripts/run.sh') git(repo.seed, 'commit', '-qm', 'layout')