Skip to content

existing NODE_OPTIONS not escaped properly #562

@dreadjr

Description

@dreadjr

Describe the bug
When NODE_OPTIONS has an existing value e.g. NODE_OPTIONS='--require "./lib/tracing.js"' it causes an error on build/deploy during startup of the firebase function.

Additional context
How are you using GCP buildpacks?

  • pack and the gcr.io/buildpacks/builder
  • Cloud Functions
  • Cloud Run
  • Cloud Build
  • App Engine Standard
  • App Engine Flex
  • Firebase App Hosting

Did this used to work?
(Yes)
Was this working before? When did you start noticing these errors? When heapsize.sh introduced into the bazel build.

What language is your project primarily written in?
(Node.js)

Steps To Reproduce
Steps to reproduce the behavior:

  1. firebase deploy --only functions

Expected behavior
To properly concentrate the existing options with the heapsize.

Actual behavior
What actually happened?
Build/deploy startup error

If applicable, add screenshots / logs / error messages

Trying to start the instance on deploy of firebase v2 (cloud run)

�[31;1mERROR: �[0mfailed to launch: exec.d: failed to decode output from exec.d file at path '/layers/google.nodejs.runtime/heapsize/exec.d/heapsize.sh': toml: line 1: expected a top-level item to end with a newline, comment, or EOF, but got '.' instead

"env": [
  {
  "name": "NODE_OPTIONS",
  "value": "--require "./lib/tracing.js""
  },
  ...
]

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions