Skip to content

Commit

Permalink
Fix ESM lambda path on Windows (#234)
Browse files Browse the repository at this point in the history
* handle ESM lambda path on Windows

---------

Co-authored-by: Jim Salyer <jim.salyer@efleets.com>
  • Loading branch information
jimsalyer and Jim Salyer authored Jul 22, 2023
1 parent d406fcc commit f68eac1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lambdalocal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,9 @@ function _executeSync(opts) {
callbackWaitsForEmptyEventLoop = false;
}

if (lambdaPath){
lambdaPath = utils.getAbsolutePath(lambdaPath);
if (lambdaPath) {
const esmWindows = esm && process.platform === 'win32';
lambdaPath = (esmWindows ? 'file://' : '') + utils.getAbsolutePath(lambdaPath);
}

// set environment variables before the require
Expand Down

0 comments on commit f68eac1

Please sign in to comment.