Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(angular): log message about unsupported ng cache command #22154

Merged
merged 1 commit into from Mar 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 12 additions & 1 deletion packages/nx/bin/init-local.ts
Expand Up @@ -107,7 +107,14 @@ function isKnownCommand(command: string) {

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

Expand Down Expand Up @@ -139,6 +146,10 @@ function handleAngularCLIFallbacks(workspace: WorkspaceTypeAndRoot) {
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/features/integrate-with-editors`);
}
} else if (process.argv[2] === 'cache') {
console.log(`"ng cache" is not natively supported by Nx.
To clear the cache, you can delete the ".angular/cache" directory (or the directory configured by "cli.cache.path" in the "angular.json" file).
To update the cache configuration, you can directly update the configuration in your "angular.json" file (https://angular.io/guide/workspace-config#cache-options).`);
} else {
try {
// nx-ignore-next-line
Expand Down