Skip to content

Commit 06065a0

Browse files
committed
Read vlt backtest patch file keys with or without the package/ prefix
The republished minimist patch (642d7f02) keys its files without the package/ prefix, so key.split('/', 1)[1] raised IndexError in every native vlt leg. Ports the matching line from #1302. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YRcjmQwhWGod7X58Hbe5FW
1 parent eda5620 commit 06065a0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/backtest-vlt.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ def holds(self, root, lock_text, side):
10691069
ok = True
10701070
for copy_dir in self.copies(root, lock_text):
10711071
for key, hashes in self.record['files'].items():
1072-
path = copy_dir / key.split('/', 1)[1]
1072+
path = copy_dir / key.removeprefix('package/')
10731073
digest = git_hash(path.read_bytes()) if path.is_file() else None
10741074
details[str(path.relative_to(root))] = digest
10751075
ok = ok and digest == hashes.get(f'{side}Hash')

0 commit comments

Comments
 (0)