def binary_path()

in aws_lambda_builders/workflows/rust_cargo/actions.py [0:0]


    def binary_path(self):
        base = self.base_path()
        if self._handler:
            binary_path = os.path.join(base, self._handler, "bootstrap")
            LOG.debug("copying function binary from %s", binary_path)
            return binary_path

        output = os.listdir(base)
        if len(output) == 1:
            binary_path = os.path.join(base, output[0], "bootstrap")
            LOG.debug("copying function binary from %s", binary_path)
            return binary_path

        LOG.warning("unexpected list of binary directories: [%s]", ", ".join(output))
        raise CargoLambdaExecutionException(
            message="unable to find function binary, use the option `artifact_executable_name` to specify the name"
        )