Skip to content

Commit

Permalink
fix: use env BUN_INSTALL to locate package.json (topgrade-rs#734)
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLauC authored and InnocentZero committed May 25, 2024
1 parent f75dc39 commit fd96ba0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/steps/os/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,12 @@ pub fn run_bun_packages(ctx: &ExecutionContext) -> Result<()> {

print_separator("Bun Packages");

if !HOME_DIR.join(".bun/install/global/package.json").exists() {
let mut package_json: PathBuf = var("BUN_INSTALL")
.map(PathBuf::from)
.unwrap_or_else(|_| HOME_DIR.join(".bun"));
package_json.push("install/global/package.json");

if !package_json.exists() {
println!("No global packages installed");
return Ok(());
}
Expand Down

0 comments on commit fd96ba0

Please sign in to comment.