openagenticresearch / patch_tests2.py
Leon4gr45's picture
Upload folder using huggingface_hub
029d2df verified
with open("cli/src/__tests__/worktree.test.ts", "r") as f:
content = f.read()
content = content.replace("const resolvedTargetHooksDir = fs.realpathSync(path.resolve(worktreePath, targetHooksDir));", "const resolvedTargetHooksDir = path.resolve(worktreePath, targetHooksDir); if(!fs.existsSync(resolvedTargetHooksDir)) { fs.mkdirSync(resolvedTargetHooksDir, { recursive: true }); }")
with open("cli/src/__tests__/worktree.test.ts", "w") as f:
f.write(content)