arabold / serverless-sentry-lib

MIT License
32 stars 15 forks source link

isLocalEnv should check for env values, not existence #24

Closed danilofuchs closed 4 years ago

danilofuchs commented 4 years ago

Since serverless-offline v6, I manually set IS_OFFLINE to either "true" or "false".

https://github.com/arabold/serverless-sentry-lib/blob/master/src/index.ts#L74 Should check for process.env.IS_OFFLINE === "true", as "false" is truthy and process.env.IS_OFFLINE will mistakenly return true

arabold commented 4 years ago

I've published 2.1.0 which explicitly checks for true, t, 1, on, or yes (similar to how the lib deals with the SENTRY_* environment vars already).