File size: 469 Bytes
029d2df
 
 
 
 
 
 
1
2
3
4
5
6
7
8
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)