Skip to content

Commit 6a3879d

Browse files
committed
feat: add a line to ensure that retrocookie pyproject.toml changes don't get added in
1 parent b329fae commit 6a3879d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/lint-from-demo.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ def lint_from_demo(
3030
no_cache=no_cache
3131
) as demo_path:
3232
pre_commit.main.main(["run", "--all-files", "--hook-stage=manual", "--show-diff-on-failure"])
33-
retrocookie(instance_path=demo_path, commits=["HEAD"])
34-
git("checkout", "HEAD", "--", "{{cookiecutter.project_name}}/pyproject.toml")
33+
try:
34+
retrocookie(instance_path=demo_path, commits=["HEAD"])
35+
finally:
36+
git("checkout", "HEAD", "--", "{{cookiecutter.project_name}}/pyproject.toml")
3537
except Exception as error:
3638
typer.secho(f"error: {error}", fg="red")
3739
sys.exit(1)

0 commit comments

Comments
 (0)