Skip to content

Commit cb793b4

Browse files
committed
Extra safety net for pyproject.toml
1 parent 0ca9092 commit cb793b4

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

scripts/run-poetry.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@ if [ -z "$RUN_ON_UNCLEAN" ]; then
2121
fi
2222
fi
2323

24+
TOML_STATUS=$(git status --porcelain pyproject.toml)
25+
if [ -n "$TOML_STATUS" ]; then
26+
echo "==== ERROR: stopping to preserve changes in 'pyproject.toml'! ===="
27+
echo
28+
git status pyproject.toml --porcelain
29+
echo
30+
echo "--------"
31+
echo "Refusing to continue as 'pyproject.toml' would be re-set at the end"
32+
echo "of this script. Please stash your changes and re-run the script!"
33+
echo
34+
exit 2
35+
fi
36+
2437
### clean up old poetry artifacts:
2538
rm -rf dist/
2639

0 commit comments

Comments
 (0)