mirror of
https://github.com/mandiant/capa.git
synced 2025-12-22 23:26:21 -08:00
Fix unrestored stashed changes in post-commit hook
If the style checker of the rule linter failed, the stashed changes were not restored. There is no reason to exist with an error code in a post hook. In pre hooks this causes the action to be aborted.
This commit is contained in:
@@ -18,7 +18,6 @@ if [ $? == 0 ]; then
|
|||||||
else
|
else
|
||||||
echo 'Style checker failed 😭';
|
echo 'Style checker failed 😭';
|
||||||
echo 'Check style-checker-output.log for details';
|
echo 'Check style-checker-output.log for details';
|
||||||
exit 1;
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run rule linter and print state (it doesn't block the commit)
|
# Run rule linter and print state (it doesn't block the commit)
|
||||||
@@ -28,7 +27,6 @@ if [ $? == 0 ]; then
|
|||||||
else
|
else
|
||||||
echo 'Rule linter failed 😭';
|
echo 'Rule linter failed 😭';
|
||||||
echo 'Check rule-linter-output.log for details';
|
echo 'Check rule-linter-output.log for details';
|
||||||
exit 2;
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Restore stashed changes
|
# Restore stashed changes
|
||||||
|
|||||||
Reference in New Issue
Block a user