Skip to content

Commit

Permalink
fix(core): prevent "ng completion" command to run through the nx cli
Browse files Browse the repository at this point in the history
  • Loading branch information
leosvelperez authored and vsavkin committed Jun 9, 2022
1 parent 67a2777 commit 8c4d413
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion packages/nx/bin/init-local.ts
Expand Up @@ -80,7 +80,15 @@ function isKnownCommand() {

function shouldDelegateToAngularCLI() {
const command = process.argv[2];
const commands = ['add', 'analytics', 'deploy', 'config', 'doc', 'update'];
const commands = [
'add',
'analytics',
'deploy',
'config',
'doc',
'update',
'completion',
];
return commands.indexOf(command) > -1;
}

Expand Down Expand Up @@ -130,6 +138,10 @@ function handleAngularCLIFallbacks(workspace: WorkspaceTypeAndRoot) {
}
})
);
} else if (process.argv[2] === 'completion') {
console.log(`"ng completion" is not natively supported by Nx.
Instead, you could try an Nx Editor Plugin for a visual tool to run Nx commands. If you're using VSCode, you can use the Nx Console plugin, or if you're using WebStorm, you could use one of the available community plugins.
For more information, see https://nx.dev/using-nx/console`);
} else {
require('nx/src/adapter/compat');
try {
Expand Down

0 comments on commit 8c4d413

Please sign in to comment.