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

Reflex installs Bun even though BUN_PATH is set #3791

Open
n0r1z0 opened this issue Aug 14, 2024 · 1 comment
Open

Reflex installs Bun even though BUN_PATH is set #3791

n0r1z0 opened this issue Aug 14, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@n0r1z0
Copy link

n0r1z0 commented Aug 14, 2024

Describe the bug
Reflex installs Bun even though BUN_PATH is set.

To Reproduce

  1. Install Bun manually. However, the version of Bun is different from constants.Bun.VERSION.
  2. Set an environment variable BUN_PATH as the installed bun path.
  3. Run reflex init.

Expected behavior
The installation of Bun would be skipped.

Additional context
The condition of Bun installation seems incorrect.

Current implementation:

# Skip if bun is already installed.
if os.path.exists(get_config().bun_path) and get_bun_version() == version.parse(
constants.Bun.VERSION
):
console.debug("Skipping bun installation as it is already installed.")
return

I suppose this should be changed as below:

# Skip if bun is already installed.
bun_path = get_config().bun_path
if bun_path != constants.Bun.DEFAULT_PATH or os.path.exists(bun_path) and get_bun_version() == version.parse(
    constants.Bun.VERSION
):
    console.debug("Skipping bun installation as it is already installed.")
    return
@n0r1z0 n0r1z0 added the bug Something isn't working label Aug 14, 2024
@Lendemor
Copy link
Collaborator

PR #4006 is introducing REFLEX_USE_SYSTEM_BUN as an env var.
Let us know if this solve the issue for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants