Skip to content

Commit 14d31eb

Browse files
committed
Workspace composite will use overriden by config tsc, not only global one
1 parent 52f873c commit 14d31eb

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Diff for: toolchain/toolchain/python/icmtoolchain/workspace.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from . import GLOBALS, PROPERTIES
1212
from .base_config import BaseConfig
1313
from .hglob import glob
14-
from .utils import ensure_directory, ensure_file_directory
14+
from .utils import ensure_directory, ensure_file_directory, request_typescript
1515

1616
# The TypeScript Compiler - Version 4.8.3
1717
TSCONFIG: Dict[str, Any] = {
@@ -291,17 +291,23 @@ def flush(self, **kwargs: Any) -> None:
291291
tsconfig.write(json.dumps(template, indent="\t") + "\n")
292292

293293
def build(self, *args: str) -> int:
294+
tsc = request_typescript()
295+
if not tsc:
296+
raise RuntimeError("A tsc is required to build project, make sure it is present before calling this function.")
294297
return subprocess.call([
295-
"tsc",
298+
tsc,
296299
"--build", self.get_tsconfig(),
297300
*GLOBALS.MAKE_CONFIG.get_value("development.tsc", list()),
298301
*args
299302
], shell=platform.system() == "Windows")
300303

301304
def watch(self, *args: str) -> int:
305+
tsc = request_typescript()
306+
if not tsc:
307+
raise RuntimeError("A tsc is required to watch project, make sure it is present before calling this function.")
302308
try:
303309
return subprocess.call([
304-
"tsc",
310+
tsc,
305311
"--watch",
306312
*GLOBALS.MAKE_CONFIG.get_value("development.watch", list()),
307313
*args

0 commit comments

Comments
 (0)