INNER CODE UNIT · Python
fail
pasteurlabs/tesseract-core · tesseract_core/runtime/cli.py:717
def fail(message: str) -> NoReturn:
raise ValueError("No input path provided after --input-path argument.")
parser.error = fail
input_path = parser.parse_known_args(sys.argv[1:])[0].input_path
if input_path is not None:
update_config(input_path=input_path.as_posix())
if (
any(arg in sys.argv for arg in skip_required_file_load_args)
or os.environ.get("_TESSERACT_IS_BUILDING", "0") == "1"
):
# Skip loading if unnecessary (based on above arguments) or during build time
tesseract_core.runtime.experimental.SKIP_REQUIRED_FILE_CHECK = True
def _apply_global_options() -> None:
"""Apply the global config options in argv before any command is registered.