Skip to content

Commit

Permalink
Fix: delete only bun directory inside the installation directory inst…
Browse files Browse the repository at this point in the history
…ead of the installation directory
  • Loading branch information
Exilio016 authored and eirslett committed Aug 20, 2024
1 parent 8c26a6d commit 60bbf02
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ private void installBunDefault() throws InstallationException {

// We need to delete the existing bun directory first so we clean out any old files, and
// so we can rename the package directory below.
File bunExtractDirectory = new File(installDirectory, createBunTargetArchitecturePath());
try {
if (installDirectory.isDirectory()) {
FileUtils.deleteDirectory(installDirectory);
if (bunExtractDirectory.isDirectory()) {
FileUtils.deleteDirectory(bunExtractDirectory);
}
} catch (IOException e) {
logger.warn("Failed to delete existing Bun installation.");
Expand Down

0 comments on commit 60bbf02

Please sign in to comment.