MCPcopy Create free account
hub / github.com/cargo-lambda/cargo-lambda-cdk / tryBundle

Method tryBundle

src/bundling.ts:138–163  ·  view source on GitHub ↗
(outputDir: string)

Source from the content-addressed store, hash-verified

136
137 this.local = {
138 tryBundle(outputDir: string) {
139 if (Bundling.runsLocally == false) {
140 process.stderr.write('Rust build cannot run locally. Switching to Docker bundling.\n');
141 return false;
142 }
143
144 const localCommand = createLocalCommand(outputDir);
145 exec(
146 osPlatform === 'win32' ? 'cmd' : 'bash',
147 [
148 osPlatform === 'win32' ? '/c' : '-c',
149 localCommand,
150 ],
151 {
152 env: { ...process.env, ...props.environment ?? {} },
153 stdio: [ // show output
154 'ignore', // ignore stdio
155 process.stderr, // redirect stdout to stderr
156 'inherit', // inherit stderr
157 ],
158 cwd: projectRoot,
159 windowsVerbatimArguments: osPlatform === 'win32',
160 },
161 );
162 return true;
163 },
164 };
165 }
166 }

Callers

nothing calls this directly

Calls 1

execFunction · 0.90

Tested by

no test coverage detected