File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -45,19 +45,22 @@ jobs:
45
45
46
46
- name : Check license file
47
47
run : |
48
+ EXIT_STATUS=0
48
49
# See: https://github.com/licensee/licensee
49
50
LICENSEE_OUTPUT="$(licensee detect --json --confidence=100)"
50
51
51
52
DETECTED_LICENSE_FILE="$(echo "$LICENSEE_OUTPUT" | jq .matched_files[0].filename | tr --delete '\r')"
52
53
echo "Detected license file: $DETECTED_LICENSE_FILE"
53
54
if [ "$DETECTED_LICENSE_FILE" != "\"$EXPECTED_LICENSE_FILENAME\"" ]; then
54
55
echo "ERROR: detected license file doesn't match expected: $EXPECTED_LICENSE_FILENAME"
55
- exit 1
56
+ EXIT_STATUS= 1
56
57
fi
57
58
58
59
DETECTED_LICENSE_TYPE="$(echo "$LICENSEE_OUTPUT" | jq .matched_files[0].matched_license | tr --delete '\r')"
59
60
echo "Detected license type: $DETECTED_LICENSE_TYPE"
60
61
if [ "$DETECTED_LICENSE_TYPE" != "\"$EXPECTED_LICENSE_TYPE\"" ]; then
61
62
echo "ERROR: detected license type doesn't match expected $EXPECTED_LICENSE_TYPE"
62
- exit 1
63
+ EXIT_STATUS= 1
63
64
fi
65
+
66
+ exit $EXIT_STATUS
You can’t perform that action at this time.
0 commit comments