Skip to content

Commit bf89cc4

Browse files
author
Levi
committed
update
1 parent b09bfc4 commit bf89cc4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cmd/updater/updater_darwin.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ func installByDmg(killSignalChan chan<- any, packagePath, destDir string) error
3737
return fmt.Errorf("failed to get mount point")
3838
}
3939

40+
// Detach the mounted DMG
41+
defer exec.Command("hdiutil", "detach", mountPoint, "-quiet").Run()
42+
4043
matches, err := filepath.Glob(filepath.Join(mountPoint, "*.app"))
4144
if err != nil {
4245
return err
@@ -53,8 +56,7 @@ func installByDmg(killSignalChan chan<- any, packagePath, destDir string) error
5356
return err
5457
}
5558

56-
// Detach the mounted DMG
57-
return exec.Command("hdiutil", "detach", mountPoint, "-quiet").Run()
59+
return nil
5860
}
5961

6062
// Get parent directory safely, handling trailing separators

0 commit comments

Comments
 (0)