diff options
author | zaverden <zaverden@yandex-team.com> | 2025-02-20 08:47:17 +0300 |
---|---|---|
committer | zaverden <zaverden@yandex-team.com> | 2025-02-20 09:26:08 +0300 |
commit | 257473b975677c584602e28ab383b78f08e93454 (patch) | |
tree | 8d930bf7ce189a5549d19768f00c19a91b382e1e /build/plugins/nots.py | |
parent | 26d53e5ffced5eae7c4c003adcae54bd87a31c98 (diff) | |
download | ydb-257473b975677c584602e28ab383b78f08e93454.tar.gz |
fix(conf): forbid TS_FILES go to parent dir
commit_hash:00bb5c9796cc72f4cce9de385fccbba84758891d
Diffstat (limited to 'build/plugins/nots.py')
-rw-r--r-- | build/plugins/nots.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/build/plugins/nots.py b/build/plugins/nots.py index e5825ac66c..7dba60f626 100644 --- a/build/plugins/nots.py +++ b/build/plugins/nots.py @@ -922,6 +922,14 @@ def on_set_ts_test_for_vars(unit: NotsUnitType, for_mod: str) -> None: @_with_report_configure_error def on_ts_files(unit: NotsUnitType, *files: str) -> None: + for f in files: + if f.startswith(".."): + ymake.report_configure_error( + "Macro TS_FILES() does not allow to get files from parent directory.\n" + f"Got path '{f}'.\n" + "Docs: https://docs.yandex-team.ru/frontend-in-arcadia/references/TS_PACKAGE#ts-files." + ) + new_cmds = ['$COPY_CMD ${{context=TEXT;input:"{0}"}} ${{noauto;output:"{0}"}}'.format(f) for f in files] all_cmds = unit.get("_TS_FILES_COPY_CMD") if all_cmds: |