MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / assertSamAvailable

Function assertSamAvailable

packages/cli/src/commands/lambda/sam.ts:26–34  ·  view source on GitHub ↗

Throws with a clear hint when the SAM CLI is not on PATH.

()

Source from the content-addressed store, hash-verified

24
25/** Throws with a clear hint when the SAM CLI is not on PATH. */
26function assertSamAvailable(): void {
27 try {
28 execFileSync("sam", ["--version"], { stdio: "ignore" });
29 } catch {
30 throw new Error(
31 "`sam` CLI not found on PATH. Install AWS SAM CLI from https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html and retry.",
32 );
33 }
34}
35
36/** Throws with a clear hint when the `aws` CLI is not on PATH. */
37function assertAwsCliAvailable(): void {

Callers 2

samDeployFunction · 0.85
samDeleteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected