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

fix: zenstack cli errors while using bun/bunx during docker build #1011

Merged
merged 9 commits into from
Feb 19, 2024

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
3 checks passed
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