Skip to content

Sanity CLI does not set NODE_ENV #647

@selrond

Description

@selrond

When using sanity CLI commands, NODE_ENV does not appear to be set.

My usecase was to customize the basePath in sanity.cli.ts based on the NODE_ENV.

To verify:

  1. clone the official Next.js starter: https://github.com/sanity-io/sanity-template-nextjs-clean
  2. add console.log(process.env) to sanity.cli.ts
  3. try to run npx sanity dev for instance, observe NODE_ENV not being among the variables

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions