From 2093cccb61701d0375c1d74a45a4e3c1dc75227c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leosvel=20P=C3=A9rez=20Espinosa?= Date: Thu, 13 Jul 2023 08:22:09 +0100 Subject: [PATCH] fix(misc): prompt for workspace name when creating it using nx init (#18079) (cherry picked from commit 6ce7fc57edda3e28a2d977ff802f57d3e7a4a0d1) --- packages/nx/src/command-line/init/init.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nx/src/command-line/init/init.ts b/packages/nx/src/command-line/init/init.ts index 3b6337a088408..75ae6e294674d 100644 --- a/packages/nx/src/command-line/init/init.ts +++ b/packages/nx/src/command-line/init/init.ts @@ -25,7 +25,8 @@ export interface InitArgs { } export async function initHandler(options: InitArgs) { - const args = process.argv.slice(2).join(' '); + // strip the 'init' command itself so we don't forward it + const args = process.argv.slice(3).join(' '); const flags = parser(args, { boolean: ['useDotNxInstallation'], alias: {