Skip to content

Commit

Permalink
fix(c-api): give a cleaner error message if cargo isn't found (#8497)
Browse files Browse the repository at this point in the history
Instead of

> Performing build step for
'wasmtime-crate''WASMTIME_CARGO_BINARY-NOTFOUND' is not recognized as an
internal or external command, operable program or batch file.

this will now instead output

> "cargo" was not found. Ensure "cargo" is in PATH. Aborting...
  • Loading branch information
dundargoc authored Apr 29, 2024
1 parent 688cd8f commit 1fa6d4f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/c-api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ if(ANDROID)
endif()
include(ExternalProject)
find_program(WASMTIME_CARGO_BINARY cargo)
if(NOT WASMTIME_CARGO_BINARY)
message(FATAL_ERROR [["cargo" was not found. Ensure "cargo" is in PATH. Aborting...]])
endif()
ExternalProject_Add(
wasmtime-crate
DOWNLOAD_COMMAND ""
Expand Down

0 comments on commit 1fa6d4f

Please sign in to comment.