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

slidev build returns 0 exit code despite failing (missing theme) #2122

Open
c-harding opened this issue Mar 21, 2025 · 0 comments
Open

slidev build returns 0 exit code despite failing (missing theme) #2122

c-harding opened this issue Mar 21, 2025 · 0 comments

Comments

@c-harding
Copy link

Describe the bug

In my CI pipeline, I have the command pnpm slidev build.

If the theme is not installed, this leads to the following prompt:

? The theme "slidev-theme-xyz" was not found in your project, do you want to install it now? › (Y/n)

However, in CI, there is no stdin, so confirming is not possible. Instead, the process exits. The status code is 0 (success), meaning that the CI pipeline thinks the build was successful and continues.

Minimal reproduction

This is reproducible locally using npx slidev build < /dev/null.

Steps to reproduce the behavior:

  1. Check out any slidev project locally (https://sli.dev/new is not enough, because the shell does not support input redirection)
  2. Ensure slidev is installed, run npm install.
  3. Replace the theme with xyz.
  4. Run npx slidev build < /dev/null in bash.
  5. Check exit code (echo $?)
  6. See that it is zero, despite the build failing.

See example CI build: step Static HTML export with Slidev.

Environment

  • Slidev version: ^51.3.0
  • Browser: -
  • OS: macOS

If you are using Slidev globally (i.e. npx slidev or npm i -g slidev), please try to reproduce the issue in a local project (i.e. npm create slidev@latest).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant