Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IS_OFFLINE is not set with --useDocker for go1.x #1001

Closed
MackJM opened this issue Jun 3, 2020 · 1 comment · Fixed by #1038
Closed

IS_OFFLINE is not set with --useDocker for go1.x #1001

MackJM opened this issue Jun 3, 2020 · 1 comment · Fixed by #1038

Comments

@MackJM
Copy link

MackJM commented Jun 3, 2020

Bug Report

From my understanding reading the docs at npmjs, I should be seeing the environment variable IS_OFFLINE while running my lambda. This is not the case for me.

Current Behavior

No variable called IS_OFFLINE is set

Sample Code

isoff := os.Getenv("IS_OFFLINE")
fmt.Println("is_off ", isoff)

Prints:
is_off

plugins:

  • serverless-manifest-plugin
  • serverless-pseudo-parameters
  • serverless-plugin-stage-variables
  • serverless-cloud-conformity
  • serverless-offline
  • serverless-dynamodb-local

provider:
runtime: go1.x
stage: dev

Expected behavior/code

IS_OFFLINE should return the value of true

Environment

  • serverless version: serverless@1.67.0
  • serverless-offline version: serverless-offline@6.3.1
  • node.js version: v12.16.1
  • OS: macOS 10.15.3
    optional, if you are using any of the following frameworks to invoke handlers

Possible Solution
I can manually set IS_OFFLINE in my serverless.yaml and it works fine

Additional context/Screenshots
I'm using --useDocker

@dustinsgoodman
Copy link

dustinsgoodman commented Jun 12, 2020

Looks like this was removed via the v6 alpha changes: #768 (comment)

Update: Opened a PR to remove it from the README #1018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants