nx icon indicating copy to clipboard operation
nx copied to clipboard

env input is ignored since 16.3.0

Open Bielik20 opened this issue 2 years ago • 0 comments

Current Behavior

Setting:

{
  "targetDefaults": {
    "deploy": {
      "inputs": [{
        "env": "STAGE"
      }]
    },
    "package": {
      "inputs": ["stage"]
    },
  },
  "namedInputs": {
    "stage": [
      {
        "env": "STAGE"
      }
}

will ignore STAGE env variable for both package and deploy targets.

Rolling back to ~16.2.0 solves the issue.

Expected Behavior

Configured env variable should invalidate cache properly.

GitHub Repo

https://github.com/Bielik20/argus/tree/d255d39af51ad1c7621626c365574acd9b980f84

Steps to Reproduce

  1. STAGE=foo npx nx run resources:package
  2. STAGE=bar npx nx run resources:package

Second command will print cache from the first one, even though it shouldn't.

Nx Report

Node   : 18.16.0
   OS     : darwin arm64
   npm    : 9.5.1
   Hasher : Native

   nx                 : 16.3.2
   @nx/js             : 16.3.2
   @nx/jest           : 16.3.2
   @nx/linter         : 16.3.2
   @nx/workspace      : 16.3.2
   @nx/devkit         : 16.3.2
   @nx/eslint-plugin  : 16.3.2
   @nx/plugin         : 16.3.2
   @nrwl/tao          : 16.3.2
   @nx/webpack        : 16.3.2
   nx-cloud           : 16.0.5
   typescript         : 5.0.4
   ---------------------------------------
   Community plugins:
   @ns3/nx-core       : 4.2.0
   @ns3/nx-serverless : 4.2.0
   ---------------------------------------
   Local workspace plugins:
   	 @argus/workspace-plugin

Failure Logs

No response

Operating System

  • [X] macOS
  • [ ] Linux
  • [ ] Windows
  • [ ] Other (Please specify)

Additional Information

No response

Bielik20 avatar Jun 16 '23 14:06 Bielik20