Skip to content

Commit f048176

Browse files
committed
fix: conditionalize commitlint --config argument
1 parent e9b53f6 commit f048176

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

action.yaml

+6-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,12 @@ runs:
131131
echo "::warning::Could not find commit range for commitlint"
132132
echo "::notice::Checking 20 most recent commit messages."
133133
fi
134-
commitlint --config "${{ inputs.config-file }}" \
134+
CONFIG_FILE="${{ inputs.config-file }}"
135+
if [[ -n "$CONFIG_FILE" ]]; then
136+
CONFIG_FILE="--config $CONFIG_FILE"
137+
fi
138+
commitlint \
139+
$CONFIG_FILE \
135140
--verbose \
136141
--color \
137142
--from "$FROM" \

0 commit comments

Comments
 (0)