-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Reflex installs Bun even though BUN_PATH is set.
To Reproduce
- Install Bun manually. However, the version of Bun is different from
constants.Bun.VERSION. - Set an environment variable
BUN_PATHas the installed bun path. - Run
reflex init.
Expected behavior
The installation of Bun would be skipped.
Additional context
The condition of Bun installation seems incorrect.
Current implementation:
reflex/reflex/utils/prerequisites.py
Lines 795 to 800 in b01c4b6
| # 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.")
returnclemlesne
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working