Skip to content

Commit df14c51

Browse files
committed
cli: Provide better error message when cloe-engine not found
Previously, cloe-launch would exit with a raised exception, which made it difficult to understand what was happening.
1 parent 8970371 commit df14c51

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

cli/cloe_launch/exec.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,14 @@ def _extract_engine_path(self, env: Environment) -> Path:
595595
pp = Path(bindir) / "cloe-engine"
596596
if pp.exists():
597597
return pp
598-
raise RuntimeError("cannot locate cloe-engine executable")
598+
599+
logging.error("Error: cannot locate cloe-engine exectuable!")
600+
logging.error("Note:")
601+
logging.error(" This problem usually stems from one of two common errors:")
602+
logging.error(" - The conanfile for cloe-launch does not require cloe-engine.")
603+
logging.error(" - The cloe-engine package or binary has not been built / is corrupted.")
604+
logging.error(" However, unconvential or unsupported package configuration may also trigger this.")
605+
sys.exit(2)
599606

600607
def _extract_plugin_paths(self, env: Environment) -> List[Path]:
601608
"""Return all Cloe plugin paths we find in LD_LIBRARY_PATH."""

0 commit comments

Comments
 (0)