Skip to content

functions predeploy/postdeploy do not work when contains = #5339

Description

@aaharu

[REQUIRED] Environment info

firebase-tools: 11.18.0

Platform: macOS

[REQUIRED] Test case

// firebase.json
{
  "functions": {
    "predeploy": "npm run build --workspace=packages/foobar",  // NG
    // "predeploy": "npm run build --workspace packages/foobar", // OK
    // "predeploy": "npm run build --workspace\\=packages/foobar", // OK
    // "predeploy": "npm run build -w packages/foobar", // OK
    // "predeploy": "npm --prefix \"$RESOURCE_DIR\" run build", // OK
    "source": "packages/foobar"
  }
}
$ firebase deploy --only functions

=== Deploying to '---'...

i  deploying functions
Running command: npm run build --workspace=packages/foobar
✔  functions: Finished running predeploy script.

It outputs Finished running predeploy script., but the predeploy was not running.
This behavior seems to be caused by cross-env-shell.

[REQUIRED] Steps to reproduce

Add predeploy script that contains = to firebase.json.

[REQUIRED] Expected behavior

The predeploy and postdeploy scripts have finished running.

[REQUIRED] Actual behavior

Activity

  1. google-oss-bot commented on Dec 15, 2022

    @google-oss-bot
    Collaborator

    This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information.

  2. assigned and unassigned on Dec 28, 2022
  3. taeold commented on Jan 19, 2023

    @taeold
    Contributor

    @aaharu Thanks for bringing this to our attention. I wasn't aware of that limitation in cross-env package.

    kentcdodds/cross-env#246

    Looks like cross-env package is depreacted, and the work needed to fix this bug might amount to - "rewrite cross-env" :(. Frankly, that isn't something I can prioritize on, but if we see that many users are having similar problem we'll definitely revisit earlier.

  4. AvaPL commented on Mar 10, 2026

    @AvaPL

    It's still an issue in 2026 :( @taeold Is there any chance till will be addressed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions