mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-05 19:55:47 +03:00
make errors better when ctest is not found
Summary: Without ctest installed, `getdeps.py test $project` would produce a bad error message about failing to run a `''` command. Instead, explicitly error early when a command is required. Reviewed By: genevievehelsel Differential Revision: D36535929 fbshipit-source-id: d300c6b1b0c124b56dffffae0a71bee9b7f12fe7
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d38d11a151
commit
21cbf997f4
@@ -6,6 +6,7 @@
|
||||
import os
|
||||
import shlex
|
||||
import sys
|
||||
from typing import Optional
|
||||
|
||||
|
||||
class Env(object):
|
||||
@@ -158,7 +159,7 @@ def tpx_path() -> str:
|
||||
return "xplat/testinfra/tpx/ctp.tpx"
|
||||
|
||||
|
||||
def path_search(env, exename: str, defval=None):
|
||||
def path_search(env, exename: str, defval: Optional[str] = None) -> Optional[str]:
|
||||
"""Search for exename in the PATH specified in env.
|
||||
exename is eg: `ninja` and this function knows to append a .exe
|
||||
to the end on windows.
|
||||
@@ -180,7 +181,7 @@ def path_search(env, exename: str, defval=None):
|
||||
return result
|
||||
|
||||
|
||||
def _perform_path_search(path, exename: str):
|
||||
def _perform_path_search(path, exename: str) -> Optional[str]:
|
||||
is_win = sys.platform.startswith("win")
|
||||
if is_win:
|
||||
exename = "%s.exe" % exename
|
||||
|
Reference in New Issue
Block a user