File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 88 Lambda ,
99 type BuildOptions ,
1010 type BuildResultV2Typical ,
11+ getLambdaOptionsFromFunction ,
1112} from '@vercel/build-utils' ;
1213import execa from 'execa' ;
1314import { installRustToolchain } from './lib/rust-toolchain' ;
@@ -40,7 +41,8 @@ async function buildHandler(
4041 const downloadedFiles = await download ( files , workPath , meta ) ;
4142 const entryPath = downloadedFiles [ entrypoint ] . fsPath ;
4243
43- const HOME = process . platform === 'win32' ? assertEnv ( 'USERPROFILE' ) : assertEnv ( 'HOME' ) ;
44+ const HOME =
45+ process . platform === 'win32' ? assertEnv ( 'USERPROFILE' ) : assertEnv ( 'HOME' ) ;
4446 const PATH = assertEnv ( 'PATH' ) ;
4547
4648 const rustEnv : RustEnv = {
@@ -96,6 +98,11 @@ async function buildHandler(
9698 getExecutableName ( binaryName ) ,
9799 ) ;
98100
101+ const lambdaOptions = await getLambdaOptionsFromFunction ( {
102+ sourceFile : entrypoint ,
103+ config,
104+ } ) ;
105+
99106 const bootstrap = getExecutableName ( 'bootstrap' ) ;
100107 const lambda = new Lambda ( {
101108 files : {
@@ -104,6 +111,7 @@ async function buildHandler(
104111 } ,
105112 handler : bootstrap ,
106113 runtime : 'provided' ,
114+ ...lambdaOptions ,
107115 } ) ;
108116 lambda . zipBuffer = await lambda . createZip ( ) ;
109117
You can’t perform that action at this time.
0 commit comments