projen / projen

Rapidly build modern applications with advanced configuration management
https://projen.io
Apache License 2.0
2.53k stars 362 forks source link

No validation done on name except duplicate checking #3627

Open jcastello-hv opened 3 weeks ago

jcastello-hv commented 3 weeks ago

It's possible to create a new task with name = "". This causes an error for all future npx projen commands until you manually remove the task from tasks.json.

https://github.com/projen/projen/blob/b2cae06d7975268e2d01671b4c57ff3a048ec860/src/tasks.ts#L48

Error: No command found in: at o (node_modules/projen/node_modules/yargs/build/index.cjs:1:1044) at _.addHandler (node_modules/projen/node_modules/yargs/build/index.cjs:1:6226) at te.command (node_modules/projen/node_modules/yargs/build/index.cjs:1:33170) at discoverTaskCommands (node_modules/projen/lib/cli/tasks.js:14:12) at main (node_modules/projen/lib/cli/index.js:18:38) at Object.<anonymous> (node_modules/projen/lib/cli/index.js:72:1) at Module._compile (node:internal/modules/cjs/loader:1376:14) at Module._extensions..js (node:internal/modules/cjs/loader:1435:10) at Module.load (node:internal/modules/cjs/loader:1207:32) at Module._load (node:internal/modules/cjs/loader:1023:12)