[READ-ONLY] Mirror of https://github.com/bombshell-dev/clack. Effortlessly build beautiful command-line apps bomb.sh/docs/clack/basics/getting-started/
cli command-line command-line-app node prompt prompts
5

Configure Feed

Select the types of activity you want to include in your feed.

fix: do nothing if spinner already stopped and stop called (#382)

authored by

James Garbutt and committed by
GitHub
(Aug 26, 2025, 10:32 AM +0100) 0b852e10 42556736

+12
+5
.changeset/short-squids-battle.md
··· 1 + --- 2 + "@clack/prompts": patch 3 + --- 4 + 5 + Handle `stop` calls on spinners which have not yet been started.
+1
packages/prompts/src/spinner.ts
··· 159 159 }; 160 160 161 161 const stop = (msg = '', code = 0): void => { 162 + if (!isSpinnerActive) return; 162 163 isSpinnerActive = false; 163 164 clearInterval(loop); 164 165 clearPrevMessage();
+6
packages/prompts/test/spinner.test.ts
··· 163 163 164 164 expect(output.buffer).toMatchSnapshot(); 165 165 }); 166 + 167 + test('does not throw if called before start', () => { 168 + const result = prompts.spinner({ output }); 169 + 170 + expect(() => result.stop()).not.toThrow(); 171 + }); 166 172 }); 167 173 168 174 describe('message', () => {