nx icon indicating copy to clipboard operation
nx copied to clipboard

feat(core): added the ability to split command property into an array in nx:run-commands executor

Open gearonix opened this issue 9 months ago • 4 comments

Current Behavior

In projects, you can often find teams that are too long. Example here:

 "run:dev": {
    "executor": "nx:run-commands",
    "options": {
      "command": "docker compose -f .docker/compose/docker-compose.services.yml -f .docker/compose/docker-compose.dev.yml --project-directory . up -d"
    },
    "dependsOn": ["update:dev"]
  }

Expected Behavior

Implemented splitting of the 'command' parameter, added the ability to pass it as an array to avoid such huge strings:

"run:dev": {
    "executor": "nx:run-commands",
    "options": {
      "command": [
	"docker compose -f",
        ".docker/compose/docker-compose.services.yml -f",
	".docker/compose/docker-compose.dev.yml",
	"--project-directory . up -d"
      ]
    },
    "dependsOn": ["update:dev"]
  },

Added a couple of tests and changed schema.json to 'run-commands' executor.

gearonix avatar Nov 11 '23 23:11 gearonix

Hi @geemi725 ,

Thanks for the question! This error could be likely because your specified filename is of type 'numpy.float64' while it should be in fact str type. Could you confirm your input field values and types?

arnavsinghvi11 avatar Jan 31 '24 18:01 arnavsinghvi11