fix(update): stop on merge conflicts instead of committing the markers
This commit is contained in:
1 parent
3d85e6f29c
commit
b10524756d
1 file changed
+4
@@ -140,6 +140,10 @@ def update(args: argparse.Namespace) -> None:
|
||||
for file in answers:
|
||||
run_update(".", answers_file=str(file), unsafe=True, overwrite=True,
|
||||
skip_answered=not args.ask, defaults=args.defaults, vcs_ref=REF)
|
||||
conflicts = subprocess.run(["git", "diff", "--name-only", "--diff-filter=U"],
|
||||
capture_output=True, text=True, check=False).stdout.split()
|
||||
if conflicts:
|
||||
sys.exit(f"{file.stem}: resolve conflicts, then commit and rerun:\n " + "\n ".join(conflicts))
|
||||
refresh_locks(file.stem)
|
||||
if git_dirty():
|
||||
subprocess.run(["git", "add", "-A"], check=True)
|
||||
|
||||
Reference in new issue
Block a user