Skip to content

Spinner not showing on using silent exec #172

Open
@tiloio

Description

@tiloio

Environment

  • OS: Windows
  • Node Version: v18.18.0
  • Package: @clack/prompts
  • Package Version: v0.7.0

Describe the bug
No spinner is shown.

To Reproduce
Run code on a real environment, shell is not working in stackblitz.

import { intro, outro, spinner } from '@clack/prompts';
import shell from "shelljs";

intro(`No spinner on shell.exec`);

const s = spinner();
s.start('Running install');
const command = await shell.exec('npm install', { silent: true });
const message = command.code === 0 ? "Installtion successful" : "Installation failed";
s.stop(message, command.code);

outro(`done`);

Steps to reproduce the behavior:

  • Install shelljs `npm install shelljs
  • run the script above
  • no spinner is shown, the shell has just a empty line....

Expected behavior
A spinner is shown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions