in aws_lambda_builders/workflows/rust_cargo/cargo_lambda.py [0:0]
def check_cargo_lambda_installation(self):
"""
Checks if Cargo Lambda is in the system
Returns
-------
str
Path to the cargo-lambda binary
Raises
------
CargoLambdaExecutionException:
Raised when Cargo Lambda is not installed in the system to run the command.
"""
LOG.debug("checking for cargo-lambda")
binaries = self._which("cargo-lambda", executable_search_paths=self._executable_search_paths)
LOG.debug("potential cargo-lambda binaries: %s", binaries)
if binaries:
return binaries[0]
else:
raise CargoLambdaExecutionException(
message="Cannot find Cargo Lambda. "
"Cargo Lambda must be installed on the host machine to use this feature. "
"Follow the gettings started guide to learn how to install it: "
"https://www.cargo-lambda.info/guide/getting-started.html"
)