Skip to content

Commit 9165be5

Browse files
committed
feat: show random fortune cookie tip after jam doctor passes
1 parent fc09b0a commit 9165be5

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/commands/doctor.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,10 @@ export async function runDoctor(options: CliOverrides): Promise<void> {
125125
} else {
126126
process.stdout.write(chalk.yellow(`\n${failCount} issue${failCount === 1 ? '' : 's'} to fix.\n`));
127127
}
128+
129+
// Show a random tip when things are looking good
130+
if (failCount === 0) {
131+
const { pickFortune } = await import('./vibes.js');
132+
process.stdout.write(chalk.dim(`\n ${pickFortune()}\n`));
133+
}
128134
}

src/commands/vibes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ function pickSong(data: VibeData): string {
225225
return songs.find(s => s.cond)!.song;
226226
}
227227

228-
function pickFortune(): string {
228+
export function pickFortune(): string {
229229
const fortunes = [
230230
'"A mass refactor is in your future. Resist."',
231231
'"Your tests pass, but do they test the right thing?"',

0 commit comments

Comments
 (0)