Skip to content

Commit 53f79c8

Browse files
committed
fix(compile): show hint instead of empty table when no rules found
1 parent d6a36c9 commit 53f79c8

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

packages/cli/src/commands/compile.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,10 @@ export async function runCompile(options: CompileOptions): Promise<void> {
404404
const allPaths = [...writtenPaths, ...result.assetPaths];
405405

406406
ui.newline();
407+
if (result.activeRuleCount === 0) {
408+
ui.warn('No rules found. Run "devw add" to install rules from the registry.');
409+
return;
410+
}
407411
ui.success(`Compiled ${String(result.activeRuleCount)} rules ${ICONS.arrow} ${String(allPaths.length)} file${allPaths.length !== 1 ? 's' : ''} ${ui.timing(result.elapsedMs)}`);
408412
ui.log(summaryTable);
409413
if (options.verbose && result.overriddenRuleIds.length > 0) {

0 commit comments

Comments
 (0)