Skip to content

Commit 52d087c

Browse files
authored
Merge pull request #316 from pre-commit-ci/restore-system-script
restore the system / script languages
2 parents 0856608 + 1532f28 commit 52d087c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

build/language-info

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ import os.path
88
import tarfile
99
import tempfile
1010

11+
import cfgv
1112
from pre_commit import constants
1213
from pre_commit.all_languages import languages
14+
from pre_commit.clientlib import CONFIG_HOOK_DICT
1315
from pre_commit.store import _make_local_repo
1416

1517

@@ -39,6 +41,11 @@ def main() -> int:
3941
'local_repo_version': constants.LOCAL_REPO_VERSION,
4042
}
4143

44+
# if this fails then remove the lines after it
45+
cfgv.validate({'id': '1', 'language': 'system'}, CONFIG_HOOK_DICT)
46+
data['languages']['system'] = data['languages']['unsupported']
47+
data['languages']['script'] = data['languages']['unsupported_script']
48+
4249
info_json = os.path.join(args.dest, 'info.json')
4350
with open(info_json, 'w') as f:
4451
json.dump(data, f)

0 commit comments

Comments
 (0)