Skip to content

Commit ce4b530

Browse files
authored
Adjust hooks to validate-config rename (#51)
Fixes #50
2 parents 34e23bf + c4d546e commit ce4b530

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.pre-commit-hooks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
- id: validate-config-in-container
1717
name: Validate package config
1818
description: Check for missing values and incorrect types
19-
entry: quay.io/packit/packit:latest packit -d validate-config
19+
entry: quay.io/packit/packit:latest packit -d config validate
2020
language: docker_image
2121
files: ^\.?packit.ya?ml$

pre-commit-hooks/validate-config.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
set -eu
44

55
if command -v packit; then
6-
packit -d validate-config
6+
if packit config validate --help >/dev/null 2>&1; then
7+
packit -d config validate
8+
else
9+
packit -d validate-config
10+
fi
711
else
812
echo "packit not installed, can't validate the config"
913
echo "either install packit or try the validate-config-in-container hook"

0 commit comments

Comments
 (0)