Skip to content

Conversation

@ErikMCM
Copy link
Contributor

@ErikMCM ErikMCM commented Feb 19, 2024

It's an obscure issue but it exists in my CI pipeline.

This PR attempts to fix the error that occurs when the following criteria are met:

  1. Zenstack CLI commands are being ran on the Bun runtime
  2. The terminal is non-TTY or not interactive (such as during docker build)
  3. The REPL action is instantiated, requiring pretty-repl which subsequently requires repl which is not supported by the Bun runtime at this time

This PR fixes the error by:

  1. Importing pretty-repl after checking if the runtime is bun and in a non-TTY terminal
  2. Using bunx instead of npx within the zenstack generate command

This PR could be reverted once Bun REPL support is fully implemented, allowing the zenstack repl command to be used in such a case. However, considering the current support for REPL on Bun is still experimental, it may be some time before it is resolved.

@ymc9
Copy link
Member

ymc9 commented Feb 19, 2024

Thank you for working on this @ErikMCM !

@ymc9 ymc9 merged commit 0704f9d into zenstackhq:dev Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants