Skip to content

Commit

Permalink
Use supported nodejs in runtime condition
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Sep 10, 2019
1 parent ecae518 commit a99e123
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/lambda/handler-runner/HandlerRunner.js
@@ -1,6 +1,10 @@
import debugLog from '../../debugLog.js'
import serverlessLog from '../../serverlessLog.js'
import { supportedPython, supportedRuby } from '../../config/index.js'
import {
supportedNodejs,
supportedPython,
supportedRuby,
} from '../../config/index.js'
import { satisfiesVersionRange } from '../../utils/index.js'

export default class HandlerRunner {
Expand Down Expand Up @@ -41,7 +45,7 @@ export default class HandlerRunner {

debugLog(`Loading handler... (${handlerPath})`)

if (runtime.startsWith('nodejs')) {
if (supportedNodejs.has(runtime)) {
const { default: InProcessRunner } = await import('./InProcessRunner.js')
return new InProcessRunner(
functionName,
Expand Down

0 comments on commit a99e123

Please sign in to comment.