Skip to content

Commit e9d8d39

Browse files
authored
fix(core): allow prompts during nx add (nrwl#28247)
This PR allows `nx add` to initialize plugins that have prompts. <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #
1 parent 161a3f1 commit e9d8d39

File tree

1 file changed

+3
-3
lines changed
  • packages/nx/src/command-line/add

1 file changed

+3
-3
lines changed

packages/nx/src/command-line/add/add.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as ora from 'ora';
44
import { isAngularPluginInstalled } from '../../adapter/angular-json';
55
import type { GeneratorsJsonEntry } from '../../config/misc-interfaces';
66
import { readNxJson, type NxJsonConfiguration } from '../../config/nx-json';
7-
import { runNxAsync } from '../../utils/child-process';
7+
import { runNxAsync, runNxSync } from '../../utils/child-process';
88
import { writeJsonFile } from '../../utils/fileutils';
99
import { logger } from '../../utils/logger';
1010
import { output } from '../../utils/output';
@@ -135,8 +135,8 @@ async function initializePlugin(
135135
args.push(...options.__overrides_unparsed__);
136136
}
137137

138-
await runNxAsync(`g ${pkgName}:${initGenerator} ${args.join(' ')}`, {
139-
silent: !options.verbose,
138+
runNxSync(`g ${pkgName}:${initGenerator} ${args.join(' ')}`, {
139+
stdio: [0, 1, 2],
140140
});
141141
} catch (e) {
142142
spinner.fail();

0 commit comments

Comments
 (0)