diff --git a/src/ServerlessOffline.js b/src/ServerlessOffline.js index 056b770e1..8a70b6680 100644 --- a/src/ServerlessOffline.js +++ b/src/ServerlessOffline.js @@ -1,4 +1,4 @@ -import process, { env, exit } from 'node:process' +import process, { exit } from 'node:process' import { log } from '@serverless/utils/log.js' import chalk from 'chalk' import { @@ -59,9 +59,6 @@ export default class ServerlessOffline { // Entry point for the plugin (sls offline) when running 'sls offline start' async start() { - // Put here so available everywhere, not just in handlers - env.IS_OFFLINE = 'true' - this.#mergeOptions() const { httpEvents, lambdas, scheduleEvents, webSocketEvents } = diff --git a/src/lambda/LambdaFunction.js b/src/lambda/LambdaFunction.js index dde67b60e..308552ade 100644 --- a/src/lambda/LambdaFunction.js +++ b/src/lambda/LambdaFunction.js @@ -200,7 +200,7 @@ export default class LambdaFunction { ...providerEnv, ...functionDefinitionEnv, _HANDLER: handler, // TODO is this available in AWS? - IS_OFFLINE: true, + IS_OFFLINE: 'true', } }