ds300 / patch-package

Fix broken node modules instantly 🏃🏽‍♀️💨
MIT License
10.26k stars 287 forks source link

Failed patch could left source code partially changed #450

Open mithenks opened 1 year ago

mithenks commented 1 year ago

Problem

When a patch failed to apply to the source code this could be left partially changed.

Description

If a patch modify more than a file it could happens that it successfully applies to the first n files and then fails when reaching the n+1 file. In this case there isn't any rollback and the n modified files are left edited.

Expected behaviour

If a patch fails to apply the target source code should be left unchanged.