Skip to content

Commit

Permalink
fix: remove duplicate env.IS_OFFLINE variable
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Jul 23, 2022
1 parent a226d63 commit b7f7072
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/ServerlessOffline.js
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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 } =
Expand Down
2 changes: 1 addition & 1 deletion src/lambda/LambdaFunction.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export default class LambdaFunction {
...providerEnv,
...functionDefinitionEnv,
_HANDLER: handler, // TODO is this available in AWS?
IS_OFFLINE: true,
IS_OFFLINE: 'true',
}
}

Expand Down

0 comments on commit b7f7072

Please sign in to comment.